SVN conversion questions
jsquyres at cisco.com
Sun Mar 30 10:30:53 CDT 2008
Many thanks for your answers; sorry it took me so long to reply. I'm
currently playing with hg with low frequency (meaning: mostly on
weekends) -- we're not planning any repository technology changes
until after our upcoming major release, which is at least 2-3 months
On Mar 24, 2008, at 1:46 PM, Patrick Mézard wrote:
> I am tempted to add a way to specify exactly what branches are being
> converted. I am not sure where to put that yet, ideas are welcome.
> Maybe as a comma separated lists of svn paths (is comma allowed in
> svn paths ?). That would also enable support for deleted branches.
How about always picking up everything in the SVN repo unless told
otherwise? I would assume that if you're converting an SVN repo to
mercurial, you'd want *everything* from history. Even if you didn't
necessarily want everything, wouldn't it be more conservative to
convert everything and let the user prune the final result if there
was more than they wanted (or perhaps use an option that says "only
grab trunk, tags, branches").
Or if you don't want to change the default behavior, perhaps:
>> So why is v1.2.3 listed separately, and what does "(inactive)" mean?
> found parent of branch /branches/v1.2lanl at 15181: /tags/v1.2-
> v1.2lanl is built on top of v1.2.3. It means the named branch
> "v1.2.3" has no head and is thus marked "(inactive)".
Gothca; makes perfect sense.
>> $ hg tags
>> tip 12553:4c250886b062
>> v1.2.5 12026:983af2eb8dc1
>> v1.2.4 11996:38355f2966f5
>> v1.2.2 11910:bfff71e6d781
>> v1.2.1 11892:8121aceeda27
>> v1.2.0 11844:5f785b73c205
>> How do I get it to pick up the rest of the tags?
Mixing in your other reply:
> Should be fixed in crew-stable by 5efd447a9b8d.
Perfect; I confirm that it works when converting our SVN repo. Many
[8:20] svbu-mpi:~/hg/sh-svn/ompi-svnroot-hg % hg tags
Here's two more off-the-wall SVN->mercurial conversion question...
1. I made an authors file to remap SVN commit usernames to proper name/
e-mail strings. However, our project is a few years old; we've had both
a) individuals move between different member organizations, and
b) member organizations change e-mail domains
And therefore several members have had multiple different e-mail
addresses over the years. The SVN commit ID "jsquyres", for example,
used to mean jsquyres at open dash mpi dot org, but now means jsquyres
at cisco dot com. Other SVN IDs have had 3 or more e-mail addresses
associated with them (e.g., students interning at other Open MPI
member organizations during the summer).
Is there a way to associate different e-mail addresses with a
Subversion ID based on a time range? Perhaps something like:
SVN_id="name and address string" start_date stop_date
jsquyres="Jeff Squyres <jsquyres at foo.example.com>" - 12/31/2006
jsquyres="Jeff Squyres <jsquyres at bar.example.com>" 01/01/2007 12/31/2007
jsquyres="Jeff Squyres <jsquyres at yow.example.com>" 01/01/2008 -
(where "-" means "beginning of time" or "end of time", depending on
which field it was used)
...or something along these lines (date formats may vary, etc.). For
backwards compatibility, if no quotes are used, the whole line can be
taken as the string -- the new start/stop date stuff can be used only
if there are quotes.
I realize that this is a super-picky question :-) ; I'm just looking
to see if we can be as accurate in the history as possible when
converting from SVN to hg.
2. In our commit messages, we not-infrequently use strings of the form
"r[0-9]+" to refer to other SVN commits. We do this not only because
it helps us track our code internally, but also because we use Trac
for our bug tracking and SVN browsing. When viewing SVN commits in
the Trac browser, Trac automatically hyperlinks strings in the commit
message matching "r[0-9]+" to the corresponding commit entry.
However, after converting to hg, these r numbers in commit messages
will no longer be relevant, and we'll lose both the historical
references and the [incredibly convenient] cross-hyperlinking. Is
there a way to get the conversion process to either change (or add)
the "r[0-9]+" strings to the relevant mercurial hash ID? Perhaps a
commit message that reads like this:
Fix borked r1234 commit.
Could be changed to:
Fix borked 6d8ec087ecd6e874bb5f44a3616878db89632892 commit.
Fix borked r1234 (6d8ec087ecd6e874bb5f44a3616878db89632892) commit.
More information about the Mercurial