##// 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 836 for section, name, value in ui.walkconfig():
837 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 852 def debugstate(ui, repo):
840 853 """show the contents of the current dirstate"""
841 854 repo.dirstate.read()
@@ -1811,6 +1824,7 b' table = {'
1811 1824 "debugancestor": (debugancestor, [], 'debugancestor INDEX REV1 REV2'),
1812 1825 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'),
1813 1826 "debugconfig": (debugconfig, [], 'debugconfig'),
1827 "debugsetparents": (debugsetparents, [], 'debugsetparents REV1 [REV2]'),
1814 1828 "debugstate": (debugstate, [], 'debugstate'),
1815 1829 "debugdata": (debugdata, [], 'debugdata FILE REV'),
1816 1830 "debugindex": (debugindex, [], 'debugindex FILE'),
General Comments 0
You need to be logged in to leave comments. Login now