IBM Support

About the pathname limitation on Windows and its affect on ClearCase

Question & Answer


Question

Is there a technote that explains how the pathname limitation on Microsoft® Windows® affects IBM® Rational® ClearCase® software configuration models?

Answer






About the pathname limitation

On Windows, a path can only be approximately 256 single-byte characters long.


The following example illustrates this limitation:

Attempts to create directory tree in Windows Explorer will truncate after so many characters.

Note: The path is C:\temp


Attempts to create a file or directory in the last directory results in the following error:


Refer to the following Microsoft references for further information:

KB148754
KB121059
Naming a File


Note: The above KB articles apply for Windows 95 but the problem still exists with NT/2000/XP/2003.


ClearCase will be affected by this limitation.


Example:

Directory path in dynamic view:



M:\dynamic_view\test_vob\path_limit\abcdefghijklmnopqrstuvwxyz\

abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghi
jklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqr
stuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz
>cd a*
The filename or extension is too long.

Note: Attempts to create an element in this directory will succeed; however, you will not be able to traverse the path to access the element due to the Windows limitation.

Example:

M:\dynamic_view\test_vob\path_limit\abcdefghijklmnopqrstuvwxyz\
abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghi
jklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqr
stuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz
>cleartool mkelem -nc test.txt
Created element "test.txt" (type "text_file").
Checked out "test.txt" from version "\main\0".

M:\dynamic_view\test_vob\path_limit\abcdefghijklmnopqrstuvwxyz\

abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghi
jklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqr
stuvwxyz\abcdefghijklmnopqrstuvwxyz\abcdefghijklmnopqrstuvwxyz
>notepad test.txt




To illustrate the distinction, attempts to create a view-private file from Windows Explorer in the same directory where the element was created results in the following error:




ClearCase Version Extended Paths

The term path in a ClearCase context also means the full path of the element you pass to the command.

For example, if you are using version extended pathname such as

filename@@\main\branch\branch\label\branch

it is very easy to reach this operating system limit, especially in a UCM environment.



Review the ClearCase Command Reference Guide on the topic of
pathnames_ccase (cleartool man pathnames_ccase) for more information about path name resolution, dynamic view context, and extended namespace.



Common ClearCase operations that are affected by long version extended pathnames are:

  • Merge and Findmerge
  • Deliver
  • Rebase
  • Export & Import


Example:

During a ClearCase merge operation on Windows, the following error appears:

Unable to get the absolute pathname of "M:\devuser1_servicing_processflow_integration\processflow\Source\Shared\
com\finances\core\processflow\ToplinkModel\Class\
com.finances.core.processflow.domain.BorrowerGroupInformationDO.xml@@\
main\servicing_processflow_integration\integration_servicing_processflow\
3":
No such file or directory.
Skipping


The reason for the error is related to the length of the path. The version extended path name is too long for Windows to manage.

Note: This length includes the drive letter (M:\) as well as the version extended pathname (@@\main\...\3).

In order to work around this limitation, you will need to shorten the pathname so Windows can process the command.

In this example, you can accomplish this task by renaming the file, the view, the branch structure (what ever you can to shorten the path).

For example, you can map a network drive to substitute the MVFS drive and view path. By mapping M:\devuser1_servicing_processflow_integration to Z:\ will cut the path by 42 characters in this example.




Context Menu does not display ClearCase options


ClearCase Context Menu appears until limitation is reached:



Further down: No ClearCase Context Menu:




Further down: No other context menus (for example Winzip® is missing).





Enhancements to combat the limitation:



How to Avoid this issue

The only way to successfully avoid any path name issues is to keep control over the length of your paths.

You can also avoid any path problems (especially in UCM), by using shorter object names (branches, labels, streams, baselines).


WORKAROUNDS:


1. Map a network drive to your dynamic views to reduce the number of characters in the path.

2. Use the
subst command to map long paths to a drive:

Example:

C:\>subst K: M:\Joe_Smith_dynamic_view\development_VOB\directory1\directory2

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Operating System Configurations","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.1;7.1;7.1.1;7.1.2;8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
19 February 2019

UID

swg21120400