forget: use relative paths for --interactive
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 07 Feb 2019 14:22:11 -0800
changeset 41661 05433ad59c52
parent 41660 f89aad980025
child 41662 0a5a6675c86c
forget: use relative paths for --interactive Seems more consistent. Differential Revision: https://phab.mercurial-scm.org/D5912
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Feb 08 13:20:46 2019 -0800
+++ b/mercurial/cmdutil.py	Thu Feb 07 14:22:11 2019 -0800
@@ -2138,13 +2138,14 @@
                       '$$ Include &all remaining files'
                       '$$ &? (display help)')
         for filename in forget[:]:
-            r = ui.promptchoice(_('forget %s %s') % (filename, responses))
+            r = ui.promptchoice(_('forget %s %s') %
+                                (uipathfn(filename), responses))
             if r == 4: # ?
                 while r == 4:
                     for c, t in ui.extractchoices(responses)[1]:
                         ui.write('%s - %s\n' % (c, encoding.lower(t)))
-                    r = ui.promptchoice(_('forget %s %s') % (filename,
-                                                                 responses))
+                    r = ui.promptchoice(_('forget %s %s') %
+                                        (uipathfn(filename), responses))
             if r == 0: # yes
                 continue
             elif r == 1: # no