diff hgext/largefiles/overrides.py @ 16516:597ddcb41b32 stable

largefiles: notice dirty large files in a subrepo Summary and commit use dirty() to check the status of a subrepository, so this overrides dirty() in the subrepo in the same manner as status() to check the large files instead of their standins. Previously, if only a large file was changed in a subrepo, summary in the top level repo would not report the subrepo was dirty and commit -S would report nothing changed. If any type of file was changed in the top repo and only a large file in the subrepo, commit -S would not commit the changes to the subrepo.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 22 Apr 2012 13:19:22 -0400
parents 12dabc22de77
children 43fb170a23bd b371056ae353
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sun Apr 22 03:47:34 2012 -0400
+++ b/hgext/largefiles/overrides.py	Sun Apr 22 13:19:22 2012 -0400
@@ -216,6 +216,13 @@
     finally:
         repo.lfstatus = False
 
+def overridedirty(orig, repo, ignoreupdate=False):
+    try:
+        repo._repo.lfstatus = True
+        return orig(repo, ignoreupdate)
+    finally:
+        repo._repo.lfstatus = False
+
 def overridelog(orig, ui, repo, *pats, **opts):
     try:
         repo.lfstatus = True