Skip to content
Snippets Groups Projects
Commit 2cb787b6 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

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

It's safe since we now reset to the previous value.

Differential Revision: https://phab.mercurial-scm.org/D7138
parent 013637f4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment