Guest User

Untitled

a guest
Aug 5th, 2015
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # This is how to fix things if you somehow manage to end up with two
  2. # repositories for the same project, where the last changeset in the
  3. # old repo should be the parent of the first changeset in the new one.
  4. # I needed to do this for Schism Tracker at one point. No idea how I
  5. # mangled it, but here's what I did.
  6. # (A tip of the hat owed to #mercurial on Freenode for helping me.)
  7.  
  8. # FOREWARNING: this will alter all the changeset IDs in the new repo!
  9.  
  10. newid=$(hg -R newrepo log -r0 --template '{node}')
  11. oldid=$(hg -R oldrepo log -rtip --template '{node}')
  12. echo $newid $oldid > map
  13. hg convert --splicemap map newrepo oldrepo
Advertisement
Add Comment
Please, Sign In to add comment