changeset 41659:ecf7f4ef52fb

debugwalk: avoid match.rel() and use repo.pathto() instead I'm about to delete match.rel() Differential Revision: https://phab.mercurial-scm.org/D5909
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 13:27:54 -0800
parents 727f0be3539a
children f89aad980025
files mercurial/debugcommands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Fri Feb 08 13:27:26 2019 -0800
+++ b/mercurial/debugcommands.py	Fri Feb 08 13:27:54 2019 -0800
@@ -2020,7 +2020,7 @@
     for abs in ctx.walk(m):
         fctx = ctx[abs]
         o = fctx.filelog().renamed(fctx.filenode())
-        rel = m.rel(abs)
+        rel = repo.pathto(abs)
         if o:
             ui.write(_("%s renamed from %s:%s\n") % (rel, o[0], hex(o[1])))
         else:
@@ -2796,9 +2796,9 @@
         f = lambda fn: util.normpath(fn)
     fmt = 'f  %%-%ds  %%-%ds  %%s' % (
         max([len(abs) for abs in items]),
-        max([len(m.rel(abs)) for abs in items]))
+        max([len(repo.pathto(abs)) for abs in items]))
     for abs in items:
-        line = fmt % (abs, f(m.rel(abs)), m.exact(abs) and 'exact' or '')
+        line = fmt % (abs, f(repo.pathto(abs)), m.exact(abs) and 'exact' or '')
         ui.write("%s\n" % line.rstrip())
 
 @command('debugwhyunstable', [], _('REV'))