##// END OF EJS Templates
largefiles: allow "lfstatus" context manager to set value to False...
Martin von Zweigbergk -
r43983:a02e4c12 default
parent child Browse files
Show More
@@ -41,9 +41,9 b" longname = b'largefiles'"
41
41
42
42
43 @contextlib.contextmanager
43 @contextlib.contextmanager
44 def lfstatus(repo):
44 def lfstatus(repo, value=True):
45 oldvalue = getattr(repo, 'lfstatus', False)
45 oldvalue = getattr(repo, 'lfstatus', False)
46 repo.lfstatus = True
46 repo.lfstatus = value
47 try:
47 try:
48 yield
48 yield
49 finally:
49 finally:
@@ -591,12 +591,8 b' def getlfilestoupload(repo, missing, add'
591 progress.update(i)
591 progress.update(i)
592 parents = [p for p in repo[n].parents() if p != node.nullid]
592 parents = [p for p in repo[n].parents() if p != node.nullid]
593
593
594 oldlfstatus = repo.lfstatus
594 with lfstatus(repo, value=False):
595 repo.lfstatus = False
596 try:
597 ctx = repo[n]
595 ctx = repo[n]
598 finally:
599 repo.lfstatus = oldlfstatus
600
596
601 files = set(ctx.files())
597 files = set(ctx.files())
602 if len(parents) == 2:
598 if len(parents) == 2:
General Comments 0
You need to be logged in to leave comments. Login now