mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
largefiles: put whole rollback-ing process into the same "wlock" scope
Before this patch, there are three distinct "wlock" scopes in "overriderollback": 1. "localrepository.rollback" via original "rollback" command, 2. "merge.update" for reverting standin files only, and 3. "overriderollback" specific "wlock" scope (to synchronize largefile dirstate) But these should be executed in the same "wlock" scope for consistency.
This commit is contained in:
parent
74cb506481
commit
26c1da5c46
@ -1140,11 +1140,12 @@ def overridepurge(orig, ui, repo, *dirs, **opts):
|
||||
repo.status = oldstatus
|
||||
|
||||
def overriderollback(orig, ui, repo, **opts):
|
||||
result = orig(ui, repo, **opts)
|
||||
merge.update(repo, node=None, branchmerge=False, force=True,
|
||||
partial=lfutil.isstandin)
|
||||
wlock = repo.wlock()
|
||||
try:
|
||||
result = orig(ui, repo, **opts)
|
||||
merge.update(repo, node=None, branchmerge=False, force=True,
|
||||
partial=lfutil.isstandin)
|
||||
|
||||
lfdirstate = lfutil.openlfdirstate(ui, repo)
|
||||
lfiles = lfutil.listlfiles(repo)
|
||||
oldlfiles = lfutil.listlfiles(repo, repo[None].parents()[0].rev())
|
||||
|
Loading…
Reference in New Issue
Block a user