Re: "svn copy --parents" allows insertion of an errant '\' in http://path

2014-05-15 Thread Tobias Bading
Hi Dan,

I just tried this on OS X (using svn 1.8.0) and I'm able to create a directory 
in the repository with a backslash in its name and delete it again.
My guess would be that this works on other UNIXes as well. So if you have 
access to a non-Windows machine, delete or rename the directory from that 
machine. (Don't forget that you have to escape the backslash with a second 
backslash for the shell.)

Tobias


On 07.05.2014, at 01:25, Dan Ellis wrote:
> Hi,
> 
> I pulled a silly mistake just now...  I accidentally let my windows backslash 
> enter into an http URL during an SVN copy operation.
> 
> copy --parents "C:\Project_files\sandbox\bar.c" 
> "http://svr/sandbox/A\B/bar1.c"; -m "bad commit"
> 
> It successfully committed.
> 
> svn update now returns the following:
> 
> svn: E155000: 'A\B' is not a valid filename in directory 
> 'C:\Project_files\sandbox\'
> 
>  First, I assume there should be a check to prevent this invalid character 
> for URLs.  Second, how do I undo my error?
> 
> I'm on SVN 1.8.5 and the backslash should give me away as a windows user 
> (Win7 - 64bit).
> 
> Thanks for the help,
> Dan
> 
> 



Re: "svn copy --parents" allows insertion of an errant '\' in http://path

2014-05-15 Thread Dan Ellis
Thank you Tobias and Bert, that worked great.

Should the HTTP URL be checked to prevent including a '\' in the URL?  I
understand the server is OK with it, but should the SVN client be able to
commit something it itself cannot support locally?

Thanks,
Dan


On Wed, May 7, 2014 at 9:04 AM, Tobias Bading  wrote:

> Hi Dan,
>
> I just tried this on OS X (using svn 1.8.0) and I'm able to create a
> directory in the repository with a backslash in its name and delete it
> again.
> My guess would be that this works on other UNIXes as well. So if you have
> access to a non-Windows machine, delete or rename the directory from that
> machine. (Don't forget that you have to escape the backslash with a
> second backslash for the shell.)
>
> Tobias
>
>
> On 07.05.2014, at 01:25, Dan Ellis wrote:
>
> Hi,
>
> I pulled a silly mistake just now...  I accidentally let my windows
> backslash enter into an http URL during an SVN copy operation.
>
> copy --parents "C:\Project_files\sandbox\bar.c" "
> http://svr/sandbox/A\B/bar1.c " -m "bad
> commit"
>
> It successfully committed.
>
> svn update now returns the following:
>
> svn: E155000: 'A\B' is not a valid filename in directory
> 'C:\Project_files\sandbox\'
>
>  First, I assume there should be a check to prevent this invalid character
> for URLs.  Second, how do I undo my error?
>
> I'm on SVN 1.8.5 and the backslash should give me away as a windows user
> (Win7 - 64bit).
>
> Thanks for the help,
> Dan
>
>
>
>


SVNCacheRevProps and other performance tweaks.

2014-05-15 Thread Terry Dooher
Hi all,

I've just finished a dump/load cycle on about 500GB worth of repositories to 
bring in the more efficient changes for FSFS in 1.8 (We're on 1.8.8 now). I'm 
looking at utilising some performance tweaks to make the most of the hardware 
the server is running on. Could someone clarify a couple of the more arcane 
directives for me, as they're only tersely or not at all described in the docs, 
yet:

SVNPathAuthz - Currently 'On'. To my understanding, the value 'short_circuit' 
will prevent any other path-based authorisation  being used for requests. I'm 
running Apache2.4/mod_dav_svn, with local Basic Auth and local Authz files. No 
network drives or other auth methods are configured for the server, which is 
dedicated to svn. Would short_circuit save me any processing time in this 
scenario or is it only useful for people with LDAP or other auth systems that 
might slow down request processing?

SVNCacheRevProps - Currently 'Off'.  I'm told that it "should only be enabled 
under the conditions described in the documentation", but I can't find any 
reference to it in the source or the 1.8 book, yet. What are the conditions in 
which it should be used and what happens if I use it outside those conditions? 
Do I risk DB corruption or is it only of benefit in specific scenarios?

SVNInMemoryCacheSize - Just want to confirm this one: Is the overall server 
memory footprint (CacheSize*No. of worker processes) under mod_dav_svn? I'm 
using the prefork mpm (some minor PHP admin scripts on the box), and typically 
have 20-80 running child workers active. Bumping this up 256kb or 1MB would 
have a negligible effect, if this is the case.

Thanks,

Terry.









Re: "svn copy --parents" allows insertion of an errant '\' in http://path

2014-05-15 Thread Ryan Schmidt

On May 6, 2014, at 18:25, Dan Ellis wrote:

> I pulled a silly mistake just now...  I accidentally let my windows backslash 
> enter into an http URL during an SVN copy operation.
> 
> copy --parents "C:\Project_files\sandbox\bar.c" 
> "http://svr/sandbox/A\B/bar1.c"; -m "bad commit"
> 
> It successfully committed.
> 
> svn update now returns the following:
> 
> svn: E155000: 'A\B' is not a valid filename in directory 
> 'C:\Project_files\sandbox\'
> 
>  First, I assume there should be a check to prevent this invalid character 
> for URLs.

You could create a pre-commit hook to check for the many Windows filename 
restrictions. I presume Subversion does not itself contain code to do so 
because this and other filenames that are invalid on Windows are valid on 
non-Windows operating systems.

> Second, how do I undo my error?

You could remove the problem item and try again:

svn rm "http://svr/sandbox/A\B/bar1.c"; -m "remove bad commit"
svn copy --parents "C:\Project_files\sandbox\bar.c" 
"http://svr/sandbox/A/B/bar1.c"; -m "good commit"

Or you could try moving the bad item to the correct path:

svn mv "http://svr/sandbox/A\B/bar1.c"; "http://svr/sandbox/A/B/bar1.c"; -m "fix 
bad commit"

You may need to first create the destination directories if they don't already 
exist in the repository.