From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Joe Corneli <holtzermann17@gmail.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: working with a large repository and git svn
Date: Fri, 14 Jan 2011 13:35:57 +0530 [thread overview]
Message-ID: <20110114080554.GA1735@kytes> (raw)
In-Reply-To: <AANLkTikCvjDqUpL-=srVKcMQx+NM6bV7FabmJ+4sPqD7@mail.gmail.com>
Hi Joe,
Joe Corneli writes:
> > I think the state of the art is currently git2svn
>
> Thanks, that did indeed work, though, for the record it uses committer
> name and email in the log that it generates, not author name and
> email, but no worries!
That should be easy enough to fix with something like this (warning:
untested). A more elegant solution would actually use some sort of
user-configurable mapping from Git authors/ committers to SVN authors
though.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
--8<--
diff --git a/git2svn b/git2svn
index 2380775..3856696 100755
--- a/git2svn
+++ b/git2svn
@@ -261,12 +261,8 @@ COMMAND: while (!eof(IN)) {
$commit{Mark} = $1;
$next = next_line($IN);
}
- if ($next =~ m/author +(.*)/) {
- $commit{Author} = $1;
- $next = next_line($IN);
- }
- unless ($next =~ m/committer +(.+) +<([^>]+)> +(\d+) +[+-](\d+)$/) {
- die "missing comitter: $_";
+ unless ($next =~ m/author +(.+) +<([^>]+)> +(\d+) +[+-](\d+)$/) {
+ die "missing author: $_";
}
$commit{CommitterName} = $1;
@@ -275,6 +271,9 @@ COMMAND: while (!eof(IN)) {
$commit{CommitterTZ} = $4;
$next = next_line($IN);
+ if ($next =~ m/committer +(.*)/) {
+ $next = next_line($IN);
+ }
my $log = read_data($IN, $next);
$next = next_line($IN);
next prev parent reply other threads:[~2011-01-14 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 1:27 working with a large repository and git svn Joe Corneli
2011-01-12 15:30 ` Wesley J. Landaker
2011-01-13 0:54 ` Joe Corneli
2011-01-13 3:23 ` Jonathan Nieder
2011-01-14 7:43 ` Joe Corneli
2011-01-14 8:05 ` Ramkumar Ramachandra [this message]
2011-01-14 8:29 ` Jonathan Nieder
2011-01-14 9:23 ` Michael Haggerty
[not found] ` <F0299861-B36C-459C-972E-856212A92615@kth.se>
2011-01-14 10:16 ` [PATCH] Optionally parse author information Ramkumar Ramachandra
2011-01-16 2:17 ` Joe Corneli
2011-01-16 2:57 ` Jonathan Nieder
2011-01-16 3:32 ` Ramkumar Ramachandra
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=20110114080554.GA1735@kytes \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=holtzermann17@gmail.com \
--cc=jrnieder@gmail.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).