[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: AW: TortoiseSVN truncates URL shown in repo browser to 259 characters

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 07 Feb 2012 20:25:42 +0100

On 07.02.2012 09:42, Markus Schaber wrote:
> Hi, Stefan,
>
> Von: Stefan Küng [mailto:tortoisesvn_at_gmail.com] On 06.02.2012 16:48,
> Markus Schaber wrote:
>>> [Checkout problems with long URLs]
>>>
>>> However, on the command line or using SharpSVN, I can checkout
>>> aforementioned URL fine.
>
> 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. Because those clients have the same limitations that the
>> windows API has.
>
> 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.[1]
>
> Both the subversion libraries, as well as SharpSVN internally use
> those variants and transparently add the prefixes if needed[2]. So
> for both of them, the 259 characters limit [3] 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.

Nothing new here I didn't know already.

>
> -- snip -- D:\test>svn --version svn, Version 1.7.2-SlikSvn-1.7.2-X64
> (SlikSvn/1.7.2) X64 übersetzt Dec 6 2011, 13:13:15 [ ... 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"
>
>
A 8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\svnobj
> A 8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz A
> 8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz\svnobj A
> 8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz\10_ABCDEFGHIJKLMNOPQRSTUVWXYZ
>
>
A
8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz\10_ABCDEFGHIJKLMNOPQRSTUVWXYZ\11_abcdefghijklmnopqrstuvwxyz
>
> [...] A
> 8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz\10_ABCDEFGHIJKLMNOPQRSTUVWXYZ\11_abcdefghijklmnopqrstuvwxyz\12_ABCDEFGHIJKLMNOPQRSTUVWXYZ\1_abcdefghijklmnopqrstuvwxyz\2_ABCDEFGHIJKLMNOPQRSTUVWXYZ\3_abcdefghijklmnopqrstuvwxyz\4_ABCDEFGHIJKLMNOPQRSTUVWXYZ\5_abcdefghijklmnopqrstuvwxyz\6_ABCDEFGHIJKLMNOPQRSTUVWXYZ\7_abcdefghijklmnopqrstuvwxyz\8_ABCDEFGHIJKLMNOPQRSTUVWXYZ\9_abcdefghijklmnopqrstuvwxyz\10_ABCDEFGHIJKLMNOPQRSTUVWXYZ\11_abcdefghijklmnopqrstuvwxyz\12_ABCDEFGHIJKLMNOPQRSTUVWXYZ\PLC_PRG_2\svnobj
>
> [...] Ausgecheckt, Revision 292.
>
> --- 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
>
>
Error: URL
> Error:
> 'svn://localhost/testrepo/LongPathProject/Device/Plc%20Logic/Application/1_abcdefghijklmnopqrstuvwxyz/2_ABCDEFGHIJKLMNOPQRSTUVWXYZ/3_abcdefghijklmnopqrstuvwxyz/4_ABCDEFGHIJKLMNOPQRSTUVWXYZ/5_abcdefghijklmnopqrstuvwxyz/6_ABCDEFGHIJKLMNOPQRSTUVWXYZ/7_abcdefg
>
>
Error: doesn't exist
> Completed!:
>
> So there seems something inside of TortoiseSVN which breaks checkout
> and export of those long Urls.

Yup: here another OS limit comes into play:
the limitation of the list box item length that the combo box uses in
those dialogs.

I'll try to work around that limitation if it's even possible...

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2918956
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-02-07 20:25:56 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.