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 path name limitation
ClearCase Version Extended Paths
Common ClearCase operations affected by limitation
Context Menu does not display ClearCase options
Enhancements to combat the limitation
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:
- Starting with ClearCase 2003.06.00, there was a change to the cleartool interface which now supports object names of up to 1024 bytes in length. Although this enhancement is not specific to UCM, it is of particular interest to UCM users, who must contend with long, generated object names.
Note: GUIs do not support 1024 bytes object names in 2003.06.00.
- Starting with ClearCase 2003.06.14 (Service Release 4) enhancements to the ClearCase GUIs were made to better handle the limitation, however, the Windows pathname limitation still exists and will need to be managed.
Note: The maximum length for an object name is still 255 characters. Review technote 1256146 for more details regarding ClearCase metadata.
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
Related Information
Was this topic helpful?
Document Information
Modified date:
19 February 2019
UID
swg21120400