largefiles: the update override only needs lfdirstate and status for --check
authorMads Kiilerich <madski@unity3d.com>
Wed, 15 Oct 2014 05:08:56 +0200
changeset 23040 46c5983ce48f
parent 23039 1350b9170089
child 23041 a36625ef1f35
largefiles: the update override only needs lfdirstate and status for --check
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Fri Oct 03 00:42:40 2014 +0200
+++ b/hgext/largefiles/overrides.py	Wed Oct 15 05:08:56 2014 +0200
@@ -351,11 +351,12 @@
     # largefiles getting updated
     wlock = repo.wlock()
     try:
-        lfdirstate = lfutil.openlfdirstate(ui, repo)
-        unsure, s = lfdirstate.status(match_.always(repo.root, repo.getcwd()),
-                                      [], False, False, False)
+        if opts['check']:
+            lfdirstate = lfutil.openlfdirstate(ui, repo)
+            unsure, s = lfdirstate.status(
+                match_.always(repo.root, repo.getcwd()),
+                [], False, False, False)
 
-        if opts['check']:
             mod = len(s.modified) > 0
             for lfile in unsure:
                 standin = lfutil.standin(lfile)