AW: TortoiseSVN truncates URL shown in repo browser to 259 characters
From: Markus Schaber <m.schaber_at_3s-software.com>
Date: Tue, 7 Feb 2012 08:42:45 +0000
Von: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
Clarification: "aforementioned URL" is the Url I mentioned, not the one of the original poster.
But the original posters URL has no path component longer than 242 characters, AFAICS, and thus should work fine on modern windows with NTFS.
> I seriously doubt that, unless you're trying that on a non-windows OS.
Most file and directory based functions in the Win32 core API have a Unicode variant which can cope with "long pathes" using the "\\?\" and "\\?\UNC\" prefixes.
Both the subversion libraries, as well as SharpSVN internally use those variants and transparently add the prefixes if needed. So for both of them, the 259 characters limit  for the whole path is extended to about 32767 bytes if the underlying FS supports it (NTFS does). There still applies a file-system specific limit per path component (file or directory name) which is 255 for both VFat and NTFS.
And even without that, the MAX_PATH limit does not apply to URLs. So it should work fine to check out a project whose URL is longer than 259 characters, if only the directory depth inside the project (plus the working copy path) don't exceed the limit.
-- snip --
D:\test>svn checkout "svn://localhost/testrepo/LongPathProject/Device/Plc Logic/Application/1_abcdefghijklmnopqrstuvwxyz/2_ABCDEFGHIJKLMNOPQRSTUVWXYZ/3_abcdefghijklmnopqrstuvwxyz/4_ABCDEFGHIJKLMNOPQRSTUVWXYZ/5_abcdefghijklmnopqrstuvwxyz/6_ABCDEFGHIJKLMNOPQRSTUVWXYZ/7_abcdefghijklmnopqrstuvwxyz/8_ABCDEFGHIJKLMNOPQRSTUVWXYZ"
--- snap ---
Note that in the example above, both the URL is longer than 255 characters (and the repo explorer "Url" text box truncates it after "7_abcdefghijklm"), as well as the directory hierarchy inside the working copy is deeper than 255 characters.
With SharpSVN, I successfully do the same things (actually, the whole tree below "LongPathProject\" comes from a working copy maintained by our SharpSVN based CoDeSys Subversion Plugin).
Even TortoiseSVN itself can mostly cope with those long Urls and files: The repo browser lets me navigate the repository to full depth (despite the fact that the URL is displayed truncated), and "SVN Check for modifications" on that working copy directory works fine (except that the deep pathes are displayed truncated as you mentioned).
However, it seems that the Checkout and Export operations fail with the following error message when triggered form the repo browser:
Command: Checkout from svn://localhost/testrepo/LongPathProject/Device/Plc Logic/Application/1_abcdefghijklmnopqrstuvwxyz/2_ABCDEFGHIJKLMNOPQRSTUVWXYZ/3_abcdefghijklmnopqrstuvwxyz/4_ABCDEFGHIJKLMNOPQRSTUVWXYZ/5_abcdefghijklmnopqrstuvwxyz/6_ABCDEFGHIJKLMNOPQRSTUVWXYZ
So there seems something inside of TortoiseSVN which breaks checkout and export of those long Urls.
 CygWin internally does the same, BTW, so I can use CygWin bash to navigate in and delete those deep directory trees where the windows explorer and cmd.exe refuse to work.
 The often mentioned count of 260 chars includes the terminating null byte.
-- ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Developer Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: firstname.lastname@example.org | Web: http://www.3s-software.com CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 ------------------------------------------------------ http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2918834 To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].Received on 2012-02-07 09:42:56 CET
This is an archived mail posted to the TortoiseSVN Users mailing list.