PDA

View Full Version : ClearCase versioned filenames longer than 256 characters


Eric Bull
17-Feb-2009, 04:56 PM
Using Beyond Compare (2 or 3) with ClearCase, on Windows XP, I'm running into a problem with versioned filenames longer than 256-characters. This name for example:

M:\bulle_uflx_7.20_dsip_umbra_0906\IGXLDriversInst rumentsDigital\HSD800LI\HSD800PI\CHSD800PITimingUt ility.cpp@@\main\Imp_Proj_init_int\Imp_uflx_main_i nt\uflx_main_int\uflx_7.00.00_Int\uflx_umbra_sw_In t\uflx_7.20_dsip_umbra_Int\bulle_uflx_7.20_dsip_um bra_0906\5

The part of the filename after the "@@" is a ClearCase version specifier. If I try to open this in Beyond Compare I immediately get an error dialog and must exit.

Has anyone found a convenient solution or workaround for this problem?

Craig
18-Feb-2009, 09:20 AM
Hi Eric,

What does the error dialog look like/say? Can you open the same path using notepad from the command line?

Lutz
18-Feb-2009, 09:27 AM
BC3 says:
18.02.2009 17:11:38 Unable to load product: External exception CCCCDEAD
when trying to open folder "product" (7 characters). Base folder contains 221 characters.

I tried to open the same path in Windows Explorer and got the message "path too long" when expanding more subfolders above 256 characters.

It seems to be a limitation of a Windows XP component used by BC.

Craig
18-Feb-2009, 09:35 AM
Lutz, have you tried it without the source control integration enabled?

BC rarely uses the shell directly, and can handle paths up to 32k (http://msdn.microsoft.com/en-us/library/aa365247.aspx). It sounds more like this is a hard limit in ClearCase. Can their own diff utility handle these paths?

I might be able to handle this by compressing long paths to their 8.3 equivalents, though there will still be a problem if that's longer than MAX_PATH too.

Do either of you have a support contact at IBM/Rational that you can ask?

Lutz
18-Feb-2009, 09:59 AM
I looked for a long path and added '\main\LATEST\' for each level to reach above 255 characters.

If BC3 (BC2?) can handle paths above 256 characters how does the Windows integration work? Is this depending on XP/Vista/32/64?
I created 'd:\abcabcabcabcabcabcabcabcabcabcabcabcabcabcabca bcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab cabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca bcabcabcabcabcabcabcabcabcabcabcab\Neuer Ordner1\xyz123456789abcdefg1234' (271 characters) but can't access the folder with Windows Explorer.

BTW: The exception CCCCDEAD looks more like a message than as a Hex-number. Is it possible to identify the external process from BC3?

Craig
18-Feb-2009, 10:16 AM
The paths passed to the Windows API are normally limited to 260 characters, but on WinNT\2K\XP\Vista you can prefix the path with \\?\ and it will allow paths up to 32,768 characters. The program has to support doing that, and BC does, adding it automatically if it's needed. The shell (Explorer) doesn't support that at all, so it's limited to 260 characters; if BC has to pass longer names to the shell will use the short (8.3) names instead, but the only cases where that's necessary are the Open/Save dialogs and deleting to the recycle bin.

Is the error causing the "Send a bug report" crash dialog, just a regular [Ok] message box, or just showing up in the log? If it's the send-a-report one I might be able to track it down.

Does ClearCase support 8.3 (Progra~1) type names in version-extended paths? Have you tried it without the source control integration active?

Lutz
18-Feb-2009, 11:02 AM
Is the error causing the "Send a bug report" crash dialog, just a regular [Ok] message box, or just showing up in the log? If it's the send-a-report one I might be able to track it down."Send a bug report" (just sent, can't get CCCCDEAD again but assertion failure instead/my thought is 2131ab54 +024 libatriaks.dll pfm_assert_fail).

Have you tried it without the source control integration active?Without the source control integration active I can access a file with a path length of 315 characters!

Lutz
18-Feb-2009, 11:19 AM
It sounds more like this is a hard limit in ClearCase. Can their own diff utility handle these paths?
@Eric: Pleasa switch the clearcase map-file back to
text_file_delta compare ..\..\bin\cleardiff.exe
text_file_delta xcompare ..\..\bin\cleardiffmrg.exe
text_file_delta merge ..\..\bin\cleardiff.exe
text_file_delta xmerge ..\..\bin\cleardiffmrg.exe

and try a 'compare to previous version' from version tree or history of the same element.

I don't have clearcase elements with so many branches.

Lutz
18-Feb-2009, 10:31 PM
Has anyone found a convenient solution or workaround for this problem?
I found a hint in the Rational ClearCase Forum here (http://www.ibm.com/developerworks/forums/thread.jspa?threadID=226072):
Originally Posted by Forrester, Ric
The long-term solution is to design your branching strategy to keep it
as flat as possible.
This may or may not include a nomenclature process which enforces
shorter view and branch names, but
in the end flatter trees are essential.
And this (http://www-01.ibm.com/support/docview.wss?uid=swg21120400):

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 (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/subst.mspx?mfr=true) command to map long paths to a drive:

Example:

C:\>subst K: M:\Joe_Smith_dynamic_view\development_VOB\director y1\directory2
And this (http://www.ibm.com/developerworks/lotus/library/Rational-migration/):

Lessons learned


...

You need a clear naming strategy to avoid running into the 260 character length limitation for ClearCase path names, which includes stream names in the version-extended path.
...

All found by searching "clearcase path length site:ibm.com".

Eric Bull
24-Feb-2009, 12:09 PM
The error dialog is titled BCompare.exe. It says "An error occurred in the application.". There are buttons labeled "send bug report", "save bug report", "continue application", "restart application", "close application".

I have more information. The error seems to be associated with a particular ClearCase view. If I access the same file from a new ClearCase view with an almost identical name, it works fine. The difference in the pathname is only two character substitutions. It doesn't make sense to me. My conclusion is ClearCase is flaky.

If I try to access the same file from notepad.exe it pops up a Notepad dialog that says "The system cannot find the path specified.". Beyond Compare can open the file, and Notepad.exe cannot. Kudos to Beyond Compare.

Lesson learned: ClearCase is flaky. When in doubt, create a new view.

Eric Bull
24-Feb-2009, 12:21 PM
@Eric: Pleasa switch the clearcase map-file back to

and try a 'compare to previous version' from version tree or history of the same element.

I don't have clearcase elements with so many branches.

When I switch back to cleardiffmrg.exe, it works. The ClearCase diff tool can open the file. It works from version tree, history, and find checkouts.

Eric Bull
24-Feb-2009, 12:33 PM
Lutz, have you tried it without the source control integration enabled?

BC rarely uses the shell directly, and can handle paths up to 32k (http://msdn.microsoft.com/en-us/library/aa365247.aspx). It sounds more like this is a hard limit in ClearCase. Can their own diff utility handle these paths?

I might be able to handle this by compressing long paths to their 8.3 equivalents, though there will still be a problem if that's longer than MAX_PATH too.

Do either of you have a support contact at IBM/Rational that you can ask?

Ah ha! I removed the view path from the Beyond Compare source control integration setup, and now Beyond Compare is able to open the file. If I add the view path back into source control integration, Beyond Compare fails to open the file. I get the same behavior with two different ClearCase views.

The ClearCase diff utility (cleardiffmrg.exe) is able to handle the path with no problem.

Craig
24-Feb-2009, 12:45 PM
If ClearCase's diff utility has source control integration it's probably talking directly to ClearCase instead of using the SCC dlls that BC does. I'll change the next release so it won't pass paths longer than MAX_PATH to the SCC api. You'll still be able to compare them, but they won't show the "controlled/checked in/checked out" statuses and won't have the corresponding menu items.