mercurial/debugcommands.py
changeset 30959 bd5694ce8beb
parent 30958 df73368c87c3
child 30988 d194f0dba7ac
equal deleted inserted replaced
30958:df73368c87c3 30959:bd5694ce8beb
  2041         max([len(abs) for abs in items]),
  2041         max([len(abs) for abs in items]),
  2042         max([len(m.rel(abs)) for abs in items]))
  2042         max([len(m.rel(abs)) for abs in items]))
  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)