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

Long Pathes on Windows and SQLite

From: Markus Schaber <m.schaber_at_codesys.com>
Date: Thu, 22 Aug 2013 12:26:41 +0000


Some days ago, I stumbled across a problem, and could analyze it a little bit those days.

Windows has a general limit on the path length of 260 characters on some APIs, while others allow a length of about 32k characters (with some restrictions).

Most (if not all) of the SVN codebase seems to work fine with those long pathes. However, it seems that SQLite is not (yet) long path clean:

--- snip ---
mkdir repo
svnadmin create repo
svn checkout file:///%CD%/repo workingcopy
svn mkdir workingcopy\foo
svn commit -mm workingcopy

SET fifty=01234567890123456789012345678901234567890123456789
SET twofifty=%fifty%%fifty%%fifty%%fifty%%fifty%

rem svn mkdir does not work with the long path, but the following
rem workaround is fine:

pushd workingcopy
svn update
svn mkdir newdir
svn mv newdir %twofifty%
svn propset svn:externals "^/foo foo" %twofifty%
svn update
--- snap ---

The last "svn update" command fails with the following error message:
--- snip ---
Updating '.':

Fetching external item into '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\foo':
svn: warning: W200030: sqlite: unable to open database file: 'D:/test/longpathtest/workingcopy/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/foo/.svn/wc.db'

Revision 1.
svn: E205011: Failure occurred processing one or more externals definitions
--- snap ---

I already mentioned this problem on IRC, where Bert meant that it is an issue in SQLite itself which has its own windows abstracton layer.

Now, some questions arise:
1) Is this issue worth to file a bug report in the SVN database? (Up to now, none of our customers has been bitten by that issue, but it is very likely that one will show up sooner or later...)

And for the folks more experienced with SQLite:
2) Is the SQLite project open and responsive for bug reports?
3) Is it possible to feed SQLite a "long" path using the \\?\ prefix?
4) Is it possible to work around this issue by providing our own SQLite VFS (which may delegate everything except file opening to the default one)?

Best regards

Markus Schaber

CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
Received on 2013-08-22 14:27:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.