largefiles: fix output of hg summary (issue3060) stable
authorNa'Tosha Bard <natosha@unity3d.com>
Sun, 08 Jan 2012 12:35:47 +0100
branchstable
changeset 15787 0c7b83a057aa
parent 15786 aca0f2b3c7e3
child 15788 07b6af9076b4
child 15798 e6c44dbe902f
largefiles: fix output of hg summary (issue3060)
hgext/largefiles/overrides.py
tests/test-largefiles.t
--- a/hgext/largefiles/overrides.py	Sun Jan 08 11:19:51 2012 +0100
+++ b/hgext/largefiles/overrides.py	Sun Jan 08 12:35:47 2012 +0100
@@ -841,7 +841,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	Sun Jan 08 11:19:51 2012 +0100
+++ b/tests/test-largefiles.t	Sun Jan 08 12:35:47 2012 +0100
@@ -10,7 +10,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
@@ -31,7 +32,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.