Patchwork D7138: largefiles: use context manager for setting "lfstatus" on subrepos too

login
register
mail settings
Submitter phabricator
Date Oct. 19, 2019, 5:14 a.m.
Message ID <89bf0a5f5d23838d33cbed5b39d43aa9@localhost.localdomain>
Download mbox | patch
Permalink /patch/42485/
State Not Applicable
Headers show

Comments

phabricator - Oct. 19, 2019, 5:14 a.m.
Closed by commit rHG2cb787b65cf2: largefiles: use context manager for setting &quot;lfstatus&quot; on subrepos too (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7138?vs=17347&id=17350

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7138/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7138

AFFECTED FILES
  hgext/largefiles/overrides.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -1208,8 +1208,8 @@ 
             sub = ctx.workingsub(subpath)
             submatch = matchmod.subdirmatcher(subpath, match)
             subprefix = prefix + subpath + b'/'
-            sub._repo.lfstatus = True
-            sub.archive(archiver, subprefix, submatch)
+            with lfstatus(sub._repo):
+                sub.archive(archiver, subprefix, submatch)
 
     archiver.done()
 
@@ -1266,8 +1266,8 @@ 
         sub = ctx.workingsub(subpath)
         submatch = matchmod.subdirmatcher(subpath, match)
         subprefix = prefix + subpath + b'/'
-        sub._repo.lfstatus = True
-        sub.archive(archiver, subprefix, submatch, decode)
+        with lfstatus(sub._repo):
+            sub.archive(archiver, subprefix, submatch, decode)
 
 
 # If a largefile is modified, the change is not reflected in its