diff hgext/largefiles/overrides.py @ 23766:ce0731e58ac9

largefiles: align the output messages for a removed file with core methods Both cmdutil.remove() and scmutil.addremove() require verbose mode or an inexact match to print the filename. Core addremove also prints the file relative to cwd only if patterns are provided to the command. And finally, both methods print the subrepo prefix when needed.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 28 Nov 2014 21:03:44 -0500
parents f2893cd8d1e5
children 749dc66e9329
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Thu Nov 06 14:55:18 2014 -0800
+++ b/hgext/largefiles/overrides.py	Fri Nov 28 21:03:44 2014 -0500
@@ -190,10 +190,13 @@
     try:
         lfdirstate = lfutil.openlfdirstate(ui, repo)
         for f in sorted(remove):
-            if isaddremove:
-                ui.status(_('removing %s\n') % f)
-            elif ui.verbose or not m.exact(f):
-                ui.status(_('removing %s\n') % m.rel(f))
+            if ui.verbose or not m.exact(f):
+                # addremove in core gets fancy with the name, remove doesn't
+                if isaddremove:
+                    name = m.uipath(f)
+                else:
+                    name = m.rel(f)
+                ui.status(_('removing %s\n') % name)
 
             if not opts.get('dry_run'):
                 if not after: