diff hgext/largefiles/overrides.py @ 16515:12dabc22de77 stable

largefiles: fix status -S reporting of subrepos (issue3231) Wrapping the status command will only invoke overridestatus() and set the lfstatus field for the top level repository. Wrapping the status function is required to set the field on child repositories. Previously, status -S would report large files in a subrepo as '?' regardless of their actual states, and was inconsistent with what status would report from within that subrepo.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 22 Apr 2012 03:47:34 -0400
parents 874a680a3e23
children 597ddcb41b32
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Thu Apr 26 02:41:20 2012 +0900
+++ b/hgext/largefiles/overrides.py	Sun Apr 22 03:47:34 2012 -0400
@@ -202,6 +202,13 @@
     restorematchfn()
     removelargefiles(ui, repo, *pats, **opts)
 
+def overridestatusfn(orig, repo, rev2, **opts):
+    try:
+        repo._repo.lfstatus = True
+        return orig(repo, rev2, **opts)
+    finally:
+        repo._repo.lfstatus = False
+
 def overridestatus(orig, ui, repo, *pats, **opts):
     try:
         repo.lfstatus = True