merge with stable
authorMartin Geisler <mg@aragost.com>
Sun, 08 Jan 2012 14:50:20 +0100
changeset 15788 07b6af9076b4
parent 15785 acb0a40fa14d (current diff)
parent 15787 0c7b83a057aa (diff)
child 15789 2c10ea43c801
merge with stable
hgext/largefiles/overrides.py
tests/test-largefiles.t
--- 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).