changeset 15788:07b6af9076b4

merge with stable
author Martin Geisler <mg@aragost.com>
date Sun, 08 Jan 2012 14:50:20 +0100
parents acb0a40fa14d (current diff) 0c7b83a057aa (diff)
children 2c10ea43c801
files hgext/largefiles/overrides.py tests/test-largefiles.t
diffstat 2 files changed, 35 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sat Jan 07 23:37:19 2012 +0100
+++ b/hgext/largefiles/overrides.py	Sun Jan 08 14:50:20 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:
@@ -839,7 +837,11 @@
             ui.status('\n')
 
 def override_summary(orig, ui, repo, *pats, **opts):
-    orig(ui, repo, *pats, **opts)
+    try:
+        repo.lfstatus = True
+        orig(ui, repo, *pats, **opts)
+    finally:
+        repo.lfstatus = False
 
     if opts.pop('large', None):
         toupload = getoutgoinglfiles(ui, repo, None, **opts)
--- a/tests/test-largefiles.t	Sat Jan 07 23:37:19 2012 +0100
+++ b/tests/test-largefiles.t	Sun Jan 08 14:50:20 2012 +0100
@@ -17,7 +17,8 @@
   > EOF
 
 Create the repo with a couple of revisions of both large and normal
-files, testing that status correctly shows largefiles.
+files, testing that status correctly shows largefiles and that summary output
+is correct.
 
   $ hg init a
   $ cd a
@@ -38,7 +39,20 @@
   M normal1
   M sub/large2
   M sub/normal2
+  $ hg sum
+  parent: 0:30d30fe6a5be tip
+   add files
+  branch: default
+  commit: 4 modified
+  update: (current)
   $ hg commit -m "edit files"
+  $ hg sum --large
+  parent: 1:ce8896473775 tip
+   edit files
+  branch: default
+  commit: (clean)
+  update: (current)
+  largefiles: No remote repo
 
 Commit preserved largefile contents.
 
@@ -57,6 +71,18 @@
   $ hg commit -m "remove files"
   $ ls
   sub
+  $ echo "testlargefile" > large1-test
+  $ hg add --large large1-test
+  $ hg st
+  A large1-test
+  $ hg rm large1-test
+  not removing large1-test: file has been marked for add (use forget to undo)
+  $ hg st
+  A large1-test
+  $ hg forget large1-test
+  $ hg st
+  ? large1-test
+  $ rm large1-test
 
 Copy both largefiles and normal files (testing that status output is correct).