Patchwork [4,of,8] debugcommands: move 'debugsub' in the new module

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 14, 2017, 6:43 p.m.
Message ID <9e95a98591cc82c20676.1487097784@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/18491/
State Accepted
Headers show

Comments

Pierre-Yves David - Feb. 14, 2017, 6:43 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1486026295 -3600
#      Thu Feb 02 10:04:55 2017 +0100
# Node ID 9e95a98591cc82c2067655e42df4112b9c2784ff
# Parent  bfbf47caee84bcd1f69be1dc55df4c642aaf40cb
# EXP-Topic debugcommands
debugcommands: move 'debugsub' in the new module

Patch

diff -r bfbf47caee84 -r 9e95a98591cc mercurial/commands.py
--- a/mercurial/commands.py	Thu Feb 02 10:04:34 2017 +0100
+++ b/mercurial/commands.py	Thu Feb 02 10:04:55 2017 +0100
@@ -1854,17 +1854,6 @@  def copy(ui, repo, *pats, **opts):
     with repo.wlock(False):
         return cmdutil.copy(ui, repo, pats, opts)
 
-@command('debugsub',
-    [('r', 'rev', '',
-     _('revision to check'), _('REV'))],
-    _('[-r REV] [REV]'))
-def debugsub(ui, repo, rev=None):
-    ctx = scmutil.revsingle(repo, rev, None)
-    for k, v in sorted(ctx.substate.items()):
-        ui.write(('path %s\n') % k)
-        ui.write((' source   %s\n') % v[0])
-        ui.write((' revision %s\n') % v[1])
-
 @command('debugsuccessorssets',
     [],
     _('[REV]'))
diff -r bfbf47caee84 -r 9e95a98591cc mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Thu Feb 02 10:04:34 2017 +0100
+++ b/mercurial/debugcommands.py	Thu Feb 02 10:04:55 2017 +0100
@@ -1884,6 +1884,17 @@  def debugsetparents(ui, repo, rev1, rev2
     with repo.wlock():
         repo.setparents(r1, r2)
 
+@command('debugsub',
+    [('r', 'rev', '',
+     _('revision to check'), _('REV'))],
+    _('[-r REV] [REV]'))
+def debugsub(ui, repo, rev=None):
+    ctx = scmutil.revsingle(repo, rev, None)
+    for k, v in sorted(ctx.substate.items()):
+        ui.write(('path %s\n') % k)
+        ui.write((' source   %s\n') % v[0])
+        ui.write((' revision %s\n') % v[1])
+
 @command('debugupgraderepo', [
     ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),
     ('', 'run', False, _('performs an upgrade')),