Patchwork D5909: debugwalk: avoid match.rel() and use repo.pathto() instead

login
register
mail settings
Submitter phabricator
Date Feb. 10, 2019, 3:41 a.m.
Message ID <8ad5268422b7ba51574b6c64e14efb3a@localhost.localdomain>
Download mbox | patch
Permalink /patch/38638/
State Not Applicable
Headers show

Comments

phabricator - Feb. 10, 2019, 3:41 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGecf7f4ef52fb: debugwalk: avoid match.rel() and use repo.pathto() instead (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5909?vs=13936&id=13991

REVISION DETAIL
  https://phab.mercurial-scm.org/D5909

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -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'))