mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
revert: move code dealing with deletions closer together
This commit is contained in:
parent
e1ac204a83
commit
ee94a5599f
@ -2976,13 +2976,6 @@ def revert(ui, repo, ctx, parents, *pats, **opts):
|
||||
clean = set(changes.clean)
|
||||
modadded = set()
|
||||
|
||||
# determine the exact nature of the deleted changesets
|
||||
deladded = set(_deleted)
|
||||
for path in _deleted:
|
||||
if path in mf:
|
||||
deladded.remove(path)
|
||||
deleted = _deleted - deladded
|
||||
|
||||
# We need to account for the state of the file in the dirstate,
|
||||
# even when we revert against something else than parent. This will
|
||||
# slightly alter the behavior of revert (doing back up or not, delete
|
||||
@ -3040,6 +3033,13 @@ def revert(ui, repo, ctx, parents, *pats, **opts):
|
||||
dsremoved.add(src)
|
||||
names[src] = (repo.pathto(src, cwd), True)
|
||||
|
||||
# determine the exact nature of the deleted changesets
|
||||
deladded = set(_deleted)
|
||||
for path in _deleted:
|
||||
if path in mf:
|
||||
deladded.remove(path)
|
||||
deleted = _deleted - deladded
|
||||
|
||||
# distinguish between file to forget and the other
|
||||
added = set()
|
||||
for abs in dsadded:
|
||||
|
Loading…
Reference in New Issue
Block a user