Mercurial > hg
view contrib/dumprevlog @ 28189:fac3a24be50e
rebase: choose default destination the same way as 'hg merge' (BC)
This changeset finally make 'hg rebase' choose its default destination using the
same logic as 'hg merge'. The previous default was "tipmost changeset on the
current branch", the new default is "the other head if there is only one". This
change has multiple consequences:
- Multiple tests which were not rebasing anything (rebasing from tipmost head)
are now rebasing on the other "lower" branch. This is the expected new
behavior.
- A test is now explicitly aborting when there is too many heads on the branch.
This is the expected behavior.
- We gained a better detection of the "nothing to rebase" case while performing
'hg pull --rebase' so the message have been updated. Making clearer than an
update was performed and why. This is beneficial side-effect.
- Rebasing from an active bookmark will behave the same as 'hg merge' from a
bookmark.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 14 Feb 2016 13:25:59 +0000 |
parents | 659f34b833b9 |
children | a212ca70205c |
line wrap: on
line source
#!/usr/bin/env python # Dump revlogs as raw data stream # $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump import sys from mercurial import revlog, node, util for fp in (sys.stdin, sys.stdout, sys.stderr): util.setbinary(fp) for f in sys.argv[1:]: binopen = lambda fn: open(fn, 'rb') r = revlog.revlog(binopen, f) print "file:", f for i in r: n = r.node(i) p = r.parents(n) d = r.revision(n) print "node:", node.hex(n) print "linkrev:", r.linkrev(i) print "parents:", node.hex(p[0]), node.hex(p[1]) print "length:", len(d) print "-start-" print d print "-end-"