diff mercurial/commands.py @ 30953:5b09e9bc0902

debugcommands: move 'debugsetparents' in the new module
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Feb 2017 10:04:02 +0100
parents 85c3c879c43a
children dad968920130
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Feb 02 10:03:31 2017 +0100
+++ b/mercurial/commands.py	Thu Feb 02 10:04:02 2017 +0100
@@ -1855,24 +1855,6 @@
     with repo.wlock(False):
         return cmdutil.copy(ui, repo, pats, opts)
 
-@command('debugsetparents', [], _('REV1 [REV2]'))
-def debugsetparents(ui, repo, rev1, rev2=None):
-    """manually set the parents of the current working directory
-
-    This is useful for writing repository conversion tools, but should
-    be used with care. For example, neither the working directory nor the
-    dirstate is updated, so file status may be incorrect after running this
-    command.
-
-    Returns 0 on success.
-    """
-
-    r1 = scmutil.revsingle(repo, rev1).node()
-    r2 = scmutil.revsingle(repo, rev2, 'null').node()
-
-    with repo.wlock():
-        repo.setparents(r1, r2)
-
 @command('debugdirstate|debugstate',
     [('', 'nodates', None, _('do not display the saved mtime')),
     ('', 'datesort', None, _('sort by saved mtime'))],