diff hgext/largefiles/overrides.py @ 15786:aca0f2b3c7e3 stable

largefiles: fix confusion upon removal of added largefile (issue3176) This patch makes "hg remove" work the same way on largefiles as it does on regular Mercurial files. If you try to remove an added largefile, the removal fails and you are instead prompted to use "hg forget" to undo the add.
author Na'Tosha Bard <natosha@unity3d.com>
date Sun, 08 Jan 2012 11:19:51 +0100
parents 9036c7d106bf
children 0c7b83a057aa
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Fri Jan 06 11:15:32 2012 +0100
+++ b/hgext/largefiles/overrides.py	Sun Jan 08 11:19:51 2012 +0100
@@ -130,7 +130,7 @@
     orig(ui, repo, *pats, **opts)
     restorematchfn()
 
-    after, force = opts.get('after'), opts.get('force')
+    after = opts.get('after')
     if not pats and not after:
         raise util.Abort(_('no files specified'))
     m = scmutil.match(repo[None], pats, opts)
@@ -145,12 +145,10 @@
 
     def warn(files, reason):
         for f in files:
-            ui.warn(_('not removing %s: %s (use -f to force removal)\n')
+            ui.warn(_('not removing %s: %s (use forget to undo)\n')
                     % (m.rel(f), reason))
 
-    if force:
-        remove, forget = modified + deleted + clean, added
-    elif after:
+    if after:
         remove, forget = deleted, []
         warn(modified + added + clean, _('file still exists'))
     else: