Add earlier history retroactively?

Nikolaus Rath Nikolaus at rath.org
Thu Apr 8 16:06:15 UTC 2010


Predrag Minic <mipedja at gmail.com> writes:
>> Is it also possible to retroactively add the old subversion history to
>> an already existing mercurial repository? How would I go about that?
>
> You can convert a subversion repository, then pull (with -f) that one
> into your existing repository, and then rebase the existing changes
> (with --config ui.merge=internal:other) on top of the pulled svn repo.

Ok, I converted my subversion repository into ../s3ql-from-svn and cloned
my hg repository into the current directory. Then I pulled the changes:

,----
| $ hg pull -f ../s3ql-from-svn 
| pulling from ../s3ql-from-svn
| searching for changes
| warning: repository is unrelated
| adding changesets
| adding manifests
| adding file changes
| added 532 changesets with 1698 changes to 251 files (+3 heads)
| (run 'hg heads' to see heads, 'hg merge' to merge)
`----

My repository then looked like this:

,----
| $ hg heads
| changeset:   564:851ec64d5c8d
| tag:         tip
| parent:      558:8335e46b54d3
| user:        convert-repo
| date:        Thu Apr 08 18:15:49 2010 +0000
| summary:     update tags
| 
| changeset:   563:f89aa3b1c12e
| branch:      exp_thread
| user:        nikratio
| date:        Sat Feb 27 01:45:25 2010 +0000
| summary:     Removed unlink.
| 
| changeset:   264:47d333bcfcf3
| branch:      llfuse
| user:        nikratio
| date:        Wed Dec 30 04:47:06 2009 +0000
| summary:     Removed whitespace.
| 
| changeset:   32:ef96082e8025
| user:        Nikolaus Rath <Nikolaus at rath.org>
| date:        Thu Apr 08 11:23:15 2010 -0400
| summary:     Export invalidate_entry and invalidate_inode.
|
| $ hg log -r 0
| changeset:   0:daf6f9f562f7
| user:        nikratio at inspiron.ap.columbia.edu
| date:        Fri Apr 02 12:26:45 2010 -0400
| summary:     Initial import of source.
`----

I then tried to rebase the initial import onto the tip from svn:

,----
| $ hg rebase --config ui.merge=internal:other --base daf6f9f562f7 --dest 851ec64d5c8d
| saving bundle to /home/nikratio/tmp/s3ql-hg/.hg/strip-backup/daf6f9f562f7-temp
| adding branch
| adding changesets
| adding manifests
| adding file changes
| added 565 changesets with 1828 changes to 254 files (+2 heads)
| rebase completed
`----

But now I lost all my subversion tags. In ../s3ql-from-svn:

,----
| $ hg tags
| tip                              531:851ec64d5c8d
| 0.8                              515:946710568362
| beta7                            489:9893d6c71dc1
| beta6                            480:d5a570e82294
| beta5                            479:3f548614e3f5
| beta4                            473:841df808cb06
| beta3                            445:274f0f5e01f0
| beta2                            389:63baef36389f
| beta1                            385:b910ea37aa60
| alpha4                           346:4785ad78ec12
| alpha3                           283:1a44077c35f1
`----

But in the new repository:

,----
| $ hg tags
| tip                              564:673d9e5da90b
`----


What did I do wrong?

Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C




More information about the Mercurial mailing list