Re: [PATCH 1/2] git-svn.perl: perform deletions before anything else
From: Thomas Rast <hidden>
Date: 2016-06-15 22:53:01
Oops, as Steven noticed I accidentally hit the wrong reply button. So here's my earlier reply and his answer. Steven Walter [off-list ref] writes:
On Thu, Feb 9, 2012 at 2:16 PM, Thomas Rast [off-list ref] wrote:quoted
Steven Walter [off-list ref] writes:quoted
If we delete a file and recreate it as a directory in a single commit, we have to tell the server about the deletion first or else we'll get "RA layer request failed: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request"[...]quoted
- my %o = ( D => 1, R => 0, C => -1, A => 3, M => 3, T => 3 ); + my %o = ( D => -2, R => 0, C => -1, A => 3, M => 3, T => 3 );You are making it delete first, but the original code seems to quite deliberately put deletion after R (rename?). Are you sure you're not breaking anything else?No, I'm not 100% sure of that. In fact, looking at cf52b8f063 where this code seems to have started, it lists my case explicitly as one that subversion does not support: "a file is removed and a directory of the same name of the removed file is created." One thing that might make a difference is that the "file" that removed was actually a symlink. So either svn treats symlinks as a special case to that rule, or else the limitation the commit was meant to address is not present on recent versions of svn. I can run some checks to see if that is the case.
--
Thomas Rast
trast@{inf,student}.ethz.ch