mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
largefiles: fix revert removing a largefile from a merge
Before revert could fail with: abort: .hglf/large@33fdd332ec: not found in manifest! The LookupError will now be caught and handled correctly.
This commit is contained in:
parent
5096819efc
commit
19813fa421
@ -142,8 +142,11 @@ def lfdirstatestatus(lfdirstate, repo, rev):
|
||||
s = lfdirstate.status(match, [], False, False, False)
|
||||
unsure, modified, added, removed, missing, unknown, ignored, clean = s
|
||||
for lfile in unsure:
|
||||
if repo[rev][standin(lfile)].data().strip() != \
|
||||
hashfile(repo.wjoin(lfile)):
|
||||
try:
|
||||
fctx = repo[rev][standin(lfile)]
|
||||
except LookupError:
|
||||
fctx = None
|
||||
if not fctx or fctx.data().strip() != hashfile(repo.wjoin(lfile)):
|
||||
modified.append(lfile)
|
||||
else:
|
||||
clean.append(lfile)
|
||||
|
@ -1220,6 +1220,10 @@ Test status after merging with a branch that introduces a new largefile:
|
||||
$ hg status
|
||||
M large
|
||||
|
||||
- revert should be able to revert files introduced in a pending merge
|
||||
$ hg revert --all -r .
|
||||
removing .hglf/large
|
||||
|
||||
Test that a normal file and a largefile with the same name and path cannot
|
||||
coexist.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user