##// END OF EJS Templates
Add debugsetparents command
Matt Mackall -
r1395:c2eb2049 default
parent child Browse files
Show More
@@ -836,6 +836,19 b' def debugconfig(ui):'
836 for section, name, value in ui.walkconfig():
836 for section, name, value in ui.walkconfig():
837 ui.write('%s.%s=%s\n' % (section, name, value))
837 ui.write('%s.%s=%s\n' % (section, name, value))
838
838
839 def debugsetparents(ui, repo, rev1, rev2=None):
840 """
841 manually set the parents of the current working directory
842
843 This is useful for writing repository conversion tools, but should
844 be used with care.
845 """
846
847 if not rev2:
848 rev2 = hex(nullid)
849
850 repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
851
839 def debugstate(ui, repo):
852 def debugstate(ui, repo):
840 """show the contents of the current dirstate"""
853 """show the contents of the current dirstate"""
841 repo.dirstate.read()
854 repo.dirstate.read()
@@ -1811,6 +1824,7 b' table = {'
1811 "debugancestor": (debugancestor, [], 'debugancestor INDEX REV1 REV2'),
1824 "debugancestor": (debugancestor, [], 'debugancestor INDEX REV1 REV2'),
1812 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'),
1825 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'),
1813 "debugconfig": (debugconfig, [], 'debugconfig'),
1826 "debugconfig": (debugconfig, [], 'debugconfig'),
1827 "debugsetparents": (debugsetparents, [], 'debugsetparents REV1 [REV2]'),
1814 "debugstate": (debugstate, [], 'debugstate'),
1828 "debugstate": (debugstate, [], 'debugstate'),
1815 "debugdata": (debugdata, [], 'debugdata FILE REV'),
1829 "debugdata": (debugdata, [], 'debugdata FILE REV'),
1816 "debugindex": (debugindex, [], 'debugindex FILE'),
1830 "debugindex": (debugindex, [], 'debugindex FILE'),
General Comments 0
You need to be logged in to leave comments. Login now