From: "Magnus Kallström" <magnus.kallstrom@gmail.com>
To: kusmabite@gmail.com
Cc: msysGit <msysgit@googlegroups.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Re: Trailing spaces in branchname (git-svn)
Date: Wed, 22 Jun 2011 00:16:43 +0200 [thread overview]
Message-ID: <BANLkTinmmk2KRTBy8rZLhpksK_wqM49_aw@mail.gmail.com> (raw)
In-Reply-To: <58D5F1F8-CC94-4629-B476-91512ED35E0E@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
2011/6/15 Magnus Kallström <magnus.kallstrom@gmail.com>
> (I hope I get it right now - previously I used Googles web-interface, and I
> just couldn't find a way to respond to all. Trying from my email client
> instead now... I have even read the 'Welcome post' again :) )
>
> Unfortunately, the patch didn't work.
>
> This is the error I get when it aborts:
> Found branch parent: (refs/remotes/CR3533 sökning på fakturabelopp )
> be4dd98d152d82f098b90089f4df6a2d411d84e1
> fatal: Unable to create 'd:/Dev/GIT/svk/KOB/.git/svn/refs/remotes/CR3533
> sökning på fakturabelopp /index.lock': No such file or directory
> read-tree be4dd98d152d82f098b90089f4df6a2d411d84e1: command returned error:
> 128
>
> The patch itself is probably working for other parts, and I even tried a
> similar patch back in March. I never managed to figure out where the call to
> the locking-function got it's path though.
>
Hi again!
I have now successfully cloned "my" repository with the following changes in
git-svn.perl. I'm not sure if the change in "sub refname" is needed, but I
will try to reproduce the error when I find the time for it (the full clone
fails after 2-3 days).
I can't tell if it breaks anything else, but as far as I can tell, the clone
is working.
Does it look as if the modification is done in the right place?
/Magnus
---8<---
diff --git a/git-svn.perl b/git-svn.perl
index 7849cfc..c5e2d23 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2126,6 +2126,9 @@ sub refname {
# @{ becomes %40{
$refname =~ s{\@\{}{%40\{}g;
+ # trailing space is not not allowed on Windows
+ $refname =~ s{ (?=/|\\|$)}{%20}g;
+
return $refname;
}
@@ -3883,6 +3886,7 @@ sub _new {
}
$_[3] = $path = '' unless (defined $path);
+ $dir =~ s{ (?=/|\\|$)}{%20}g;
mkpath([$dir]);
bless {
ref_id => $ref_id, dir => $dir, index => "$dir/index",
---8<---
[-- Attachment #2: Type: text/html, Size: 3745 bytes --]
prev parent reply other threads:[~2011-06-21 22:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0014af8a-3b24-4398-88aa-7a3e460f2283@s11g2000yqh.googlegroups.com>
2011-03-24 21:26 ` [msysGit] Trailing spaces in branchname (git-svn) Erik Faye-Lund
[not found] ` <12ada6de-4345-4259-b832-371a74df9775@l6g2000vbn.googlegroups.com>
2011-06-15 14:00 ` Erik Faye-Lund
[not found] ` <b8767de1-ab2c-4d2a-9024-9ad9b29c614d@j9g2000vbs.googlegroups.com>
2011-06-15 14:38 ` [msysGit] " Erik Faye-Lund
2011-06-15 21:13 ` Magnus Kallström
2011-06-21 22:16 ` Magnus Kallström [this message]
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=BANLkTinmmk2KRTBy8rZLhpksK_wqM49_aw@mail.gmail.com \
--to=magnus.kallstrom@gmail.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
--cc=msysgit@googlegroups.com \
/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).