##// END OF EJS Templates
copies: add test that makes both the merging csets dirty and fails...
copies: add test that makes both the merging csets dirty and fails This patch is a part of series which is about the case when both the merging csets are not descendant of merge base. The existing code assumes if c1 is dirty there shouldn't be any partial copies from c2 i.e both2['incomplete'] and same for c2, if c2 is dirty both1['incomplete'] should be empty, but this is not the right assumption. Now as we know we can have both c1 and c2 dirty at the same time, it is possible that c1 is dirty and both2['incomplete'] has some value. Or if c2 is dirty and both1['incomplete'] has some value. Added test shows that because of this assumption it could fail. Differential Revision: https://phab.mercurial-scm.org/D5962

File last commit:

r39983:a063b84c default
r42097:fc4b7a46 default
Show More
dumprevlog
43 lines | 1.0 KiB | text/plain | TextLexer
#!/usr/bin/env python
# Dump revlogs as raw data stream
# $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
from __future__ import absolute_import, print_function
import sys
from mercurial import (
encoding,
node,
pycompat,
revlog,
)
from mercurial.utils import (
procutil,
)
for fp in (sys.stdin, sys.stdout, sys.stderr):
procutil.setbinary(fp)
def binopen(path, mode=b'rb'):
if b'b' not in mode:
mode = mode + b'b'
return open(path, pycompat.sysstr(mode))
def printb(data, end=b'\n'):
sys.stdout.flush()
pycompat.stdout.write(data + end)
for f in sys.argv[1:]:
r = revlog.revlog(binopen, encoding.strtolocal(f))
print("file:", f)
for i in r:
n = r.node(i)
p = r.parents(n)
d = r.revision(n)
printb(b"node: %s" % node.hex(n))
printb(b"linkrev: %d" % r.linkrev(i))
printb(b"parents: %s %s" % (node.hex(p[0]), node.hex(p[1])))
printb(b"length: %d" % len(d))
printb(b"-start-")
printb(d)
printb(b"-end-")