[PATCH] largefiles: fix output of hg summary (issue3060)

Na'Tosha Bard natosha at unity3d.com
Sun Jan 8 05:36:08 CST 2012


# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1326022547 -3600
# Node ID 573b3e505ba5bee54776ec4f875cd39b85e2de80
# Parent  f15c646bffc7187c357f3dcc12761513c1ed6609
largefiles: fix output of hg summary (issue3060)

diff -r f15c646bffc7 -r 573b3e505ba5 hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Thu Jan 05 07:26:22 2012 -0800
+++ b/hgext/largefiles/overrides.py	Sun Jan 08 12:35:47 2012 +0100
@@ -840,7 +840,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)
diff -r f15c646bffc7 -r 573b3e505ba5 tests/test-largefiles.t
--- a/tests/test-largefiles.t	Thu Jan 05 07:26:22 2012 -0800
+++ b/tests/test-largefiles.t	Sun Jan 08 12:35:47 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.
 


More information about the Mercurial-devel mailing list