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

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 15, 2014, 3:09 a.m.
Message ID <4243f95ba598f6698021.1413342552@localhost.localdomain>
Download mbox | patch
Permalink /patch/6270/
State Accepted
Headers show

Comments

Mads Kiilerich - Oct. 15, 2014, 3:09 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@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

Patch

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)