##// END OF EJS Templates
Add debugancestor command
mpm@selenic.com -
r1262:325c07fd default
parent child Browse files
Show More
@@ -789,6 +789,12 b' def copy(ui, repo, *pats, **opts):'
789 errs, copied = docopy(ui, repo, pats, opts)
789 errs, copied = docopy(ui, repo, pats, opts)
790 return errs
790 return errs
791
791
792 def debugancestor(ui, index, rev1, rev2):
793 """find the ancestor revision of two revisions in a given index"""
794 r = revlog.revlog(file, index, "")
795 a = r.ancestor(r.lookup(rev1), r.lookup(rev2))
796 ui.write("%d:%s\n" % (r.rev(a), hex(a)))
797
792 def debugcheckstate(ui, repo):
798 def debugcheckstate(ui, repo):
793 """validate the correctness of the current dirstate"""
799 """validate the correctness of the current dirstate"""
794 parent1, parent2 = repo.dirstate.parents()
800 parent1, parent2 = repo.dirstate.parents()
@@ -1801,6 +1807,7 b' table = {'
1801 ('f', 'force', None, 'replace destination if it exists'),
1807 ('f', 'force', None, 'replace destination if it exists'),
1802 ('p', 'parents', None, 'append source path to dest')],
1808 ('p', 'parents', None, 'append source path to dest')],
1803 'hg copy [OPTION]... [SOURCE]... DEST'),
1809 'hg copy [OPTION]... [SOURCE]... DEST'),
1810 "debugancestor": (debugancestor, [], 'debugancestor INDEX REV1 REV2'),
1804 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'),
1811 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'),
1805 "debugconfig": (debugconfig, [], 'debugconfig'),
1812 "debugconfig": (debugconfig, [], 'debugconfig'),
1806 "debugstate": (debugstate, [], 'debugstate'),
1813 "debugstate": (debugstate, [], 'debugstate'),
@@ -1983,7 +1990,7 b' globalopts = ['
1983 ('h', 'help', None, 'display help and exit'),
1990 ('h', 'help', None, 'display help and exit'),
1984 ]
1991 ]
1985
1992
1986 norepo = ("clone init version help debugconfig debugdata"
1993 norepo = ("clone init version help debugancestor debugconfig debugdata"
1987 " debugindex debugindexdot paths")
1994 " debugindex debugindexdot paths")
1988
1995
1989 def find(cmd):
1996 def find(cmd):
General Comments 0
You need to be logged in to leave comments. Login now