From: Andrew Sayers <andrew-git@pileofstuff.org>
To: Nick Douma <n.douma@nekoconeko.nl>
Cc: git@vger.kernel.org
Subject: Re: Migrating SVN to Git, and preserve merge information
Date: Tue, 10 Apr 2012 23:57:38 +0100 [thread overview]
Message-ID: <4F84BAE2.5090803@pileofstuff.org> (raw)
In-Reply-To: <4F844F33.5000004@nekoconeko.nl>
Hi Nick,
Would I be right in thinking that a commit like "Merged r100,r101,r102
from trunk" will create three grafts? If so, that might be the problem.
Git differentiates between "merges" (which include every commit up to
and including the specified one) and "cherry-picks" (which just include
the specified commit), whereas SVN calls both of these "merges". Grafts
are a way of creating "merges" rather than "cherry-picks" (which git
doesn't have any metadata for), and it's not at all easy to get "merge"
data out of SVN in the general case. Having said that, it's often a
good enough heuristic to pick the highest revision number mentioned in
the commit message and pretend it's a merge.
Incidentally, I'm planning to work on this area of SVN->git conversion
in the coming months. I don't have anything you could use yet, but I
don't suppose the scripts you used are available somewhere? Getting
revision information out of log files is particularly tricky, and
everyone stumbles over a different set of issues. I'd be really
interested to pick any nuggets of wisdom out of the approach you took.
- Andrew
next prev parent reply other threads:[~2012-04-10 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 15:18 Migrating SVN to Git, and preserve merge information Nick Douma
2012-04-10 22:57 ` Andrew Sayers [this message]
2012-04-11 7:24 ` Nick Douma
2012-04-11 11:13 ` Santi Béjar
2012-04-11 17:58 ` Andrew Sayers
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=4F84BAE2.5090803@pileofstuff.org \
--to=andrew-git@pileofstuff.org \
--cc=git@vger.kernel.org \
--cc=n.douma@nekoconeko.nl \
/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).