Braindump

Mirror Svn Repo With Hg

Braindump.MirrorSvnRepoWithHg History

Hide minor edits - Show changes to output

March 01, 2010, at 01:04 PM by 129.187.179.99 -
Changed lines 50-53 from:
!!! Pushing/publishing the hg mirror

You can now publish the hg mirror like this:
to:
!!! Improving the hg log regarding user names

Subversion and Mercurial user names differ. Typically with hg you rather use information resembling an email address than a system login name. To map Subversion user names to Mercurial user names you can provide a simple text file (let's name it @@authors.txt@@) with content like that:
Changed lines 55-56 from:
$ cd /path/to/project/hg-mirror
$ hg push ssh://someuser@hg.example.com/path/to/project
to:
jdoe = John Doe <john@example.org>
jdoe2 = Jane Doe <jane@example.org>
Changed lines 59-60 from:
If you always push to the same location, you can save some typing. Edit @@/path/to/project/hg-mirror/.hg/hgrc@@ and add a value for @@default-push@@ under section @@[paths]@@:
to:
Then add this when converting from Subversion, like that: @@hg convert --authors authors.txt svn-mirror hg-mirror@@

!!! Pushing/publishing the hg mirror

You can now publish the hg mirror like this:
Added lines 66-72:
$ cd /path/to/project/hg-mirror
$ hg push ssh://someuser@hg.example.com/path/to/project
@]

If you always push to the same location, you can save some typing. Edit @@/path/to/project/hg-mirror/.hg/hgrc@@ and add a value for @@default-push@@ under section @@[paths]@@:

[@