##// END OF EJS Templates
debugcommands: move 'debugwireargs' in the new module
Pierre-Yves David -
r30959:bd5694ce default
parent child Browse files
Show More
@@ -1852,28 +1852,6 b' def copy(ui, repo, *pats, **opts):'
1852 with repo.wlock(False):
1852 with repo.wlock(False):
1853 return cmdutil.copy(ui, repo, pats, opts)
1853 return cmdutil.copy(ui, repo, pats, opts)
1854
1854
1855 @command('debugwireargs',
1856 [('', 'three', '', 'three'),
1857 ('', 'four', '', 'four'),
1858 ('', 'five', '', 'five'),
1859 ] + remoteopts,
1860 _('REPO [OPTIONS]... [ONE [TWO]]'),
1861 norepo=True)
1862 def debugwireargs(ui, repopath, *vals, **opts):
1863 repo = hg.peer(ui, opts, repopath)
1864 for opt in remoteopts:
1865 del opts[opt[1]]
1866 args = {}
1867 for k, v in opts.iteritems():
1868 if v:
1869 args[k] = v
1870 # run twice to check that we don't mess up the stream for the next command
1871 res1 = repo.debugwireargs(*vals, **args)
1872 res2 = repo.debugwireargs(*vals, **args)
1873 ui.write("%s\n" % res1)
1874 if res1 != res2:
1875 ui.warn("%s\n" % res2)
1876
1877 @command('^diff',
1855 @command('^diff',
1878 [('r', 'rev', [], _('revision'), _('REV')),
1856 [('r', 'rev', [], _('revision'), _('REV')),
1879 ('c', 'change', '', _('change made by revision'), _('REV'))
1857 ('c', 'change', '', _('change made by revision'), _('REV'))
@@ -2043,3 +2043,25 b' def debugwalk(ui, repo, *pats, **opts):'
2043 for abs in items:
2043 for abs in items:
2044 line = fmt % (abs, f(m.rel(abs)), m.exact(abs) and 'exact' or '')
2044 line = fmt % (abs, f(m.rel(abs)), m.exact(abs) and 'exact' or '')
2045 ui.write("%s\n" % line.rstrip())
2045 ui.write("%s\n" % line.rstrip())
2046
2047 @command('debugwireargs',
2048 [('', 'three', '', 'three'),
2049 ('', 'four', '', 'four'),
2050 ('', 'five', '', 'five'),
2051 ] + commands.remoteopts,
2052 _('REPO [OPTIONS]... [ONE [TWO]]'),
2053 norepo=True)
2054 def debugwireargs(ui, repopath, *vals, **opts):
2055 repo = hg.peer(ui, opts, repopath)
2056 for opt in commands.remoteopts:
2057 del opts[opt[1]]
2058 args = {}
2059 for k, v in opts.iteritems():
2060 if v:
2061 args[k] = v
2062 # run twice to check that we don't mess up the stream for the next command
2063 res1 = repo.debugwireargs(*vals, **args)
2064 res2 = repo.debugwireargs(*vals, **args)
2065 ui.write("%s\n" % res1)
2066 if res1 != res2:
2067 ui.warn("%s\n" % res2)
General Comments 0
You need to be logged in to leave comments. Login now