[PATCH 5 of 8] largefiles: the update override only needs lfdirstate and status for --check

Mads Kiilerich mads at kiilerich.com
Tue Oct 14 22:09:12 CDT 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1413342536 -7200
#      Wed Oct 15 05:08:56 2014 +0200
# Node ID 4243f95ba598f6698021263e635f890aaf88528f
# Parent  f25d82ea18cc11d29d316b5c1777e635b01472b4
largefiles: the update override only needs lfdirstate and status for --check

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -351,11 +351,12 @@ def overrideupdate(orig, ui, repo, *pats
     # 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)


More information about the Mercurial-devel mailing list