git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Walter <stevenrwalter@gmail.com>
To: normalperson@yhbt.net, git@vger.kernel.org
Cc: Steven Walter <stevenrwalter@gmail.com>
Subject: [PATCH 1/2] git-svn.perl: perform deletions before anything else
Date: Thu,  9 Feb 2012 13:55:24 -0500	[thread overview]
Message-ID: <1328813725-16638-1-git-send-email-stevenrwalter@gmail.com> (raw)

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"
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 570d83d..520b02b 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -5391,7 +5391,7 @@ sub DESTROY {
 sub apply_diff {
 	my ($self) = @_;
 	my $mods = $self->{mods};
-	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 );
 	foreach my $m (sort { $o{$a->{chg}} <=> $o{$b->{chg}} } @$mods) {
 		my $f = $m->{chg};
 		if (defined $o{$f}) {
-- 
1.7.9.4.ge7a0d

             reply	other threads:[~2012-02-09 18:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 18:55 Steven Walter [this message]
2012-02-09 18:55 ` [PATCH 2/2] git-svn.perl: fix a false-positive in the "already exists" test Steven Walter
2012-02-09 20:08 ` [PATCH 1/2] git-svn.perl: perform deletions before anything else Junio C Hamano
2012-02-09 20:52   ` Steven Walter
2012-02-09 20:52     ` Steven Walter
2012-02-12  7:03       ` Eric Wong
2012-02-12 15:35         ` Steven Walter
2012-02-12 23:49           ` Eric Wong
2012-02-15 17:47             ` Steven Walter
2012-02-19 10:54               ` Eric Wong
2012-02-20 14:17                 ` [PATCH] git-svn.perl: fix a false-positive in the "already exists" test Steven Walter
2012-02-22  0:33                   ` Eric Wong
2012-02-22  2:16                   ` Junio C Hamano
2012-02-22  2:32                     ` Steven Walter
2012-02-22  5:08                       ` Junio C Hamano
2012-02-23 23:17                         ` Steven Walter
     [not found] ` <87mx8rrf5i.fsf@thomas.inf.ethz.ch>
     [not found]   ` <CAK8d-aJ3wi0e_NPunow-aBnhs1=o5K25r3e-Ha0m1U0ujTv7OA@mail.gmail.com>
2012-02-09 20:55     ` [PATCH 1/2] git-svn.perl: perform deletions before anything else Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328813725-16638-1-git-send-email-stevenrwalter@gmail.com \
    --to=stevenrwalter@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).