mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
revert: explicitly get status against the parent
This makes absolutely no functional changes. The default value for node1 is already the same as the current value of parent. But to be able to properly use the second parent in merge context, we have to start to be a bit more explicit about what we compute the status against.
This commit is contained in:
parent
ffa305346b
commit
f11f5d8bf7
@ -2298,7 +2298,7 @@ def revert(ui, repo, ctx, parents, *pats, **opts):
|
||||
|
||||
# Find status of all file in `names`. (Against working directory parent)
|
||||
m = scmutil.matchfiles(repo, names)
|
||||
changes = repo.status(match=m)[:4]
|
||||
changes = repo.status(node1=parent, match=m)[:4]
|
||||
modified, added, removed, deleted = map(set, changes)
|
||||
|
||||
# if f is a rename, update `names` to also revert the source
|
||||
|
Loading…
Reference in New Issue
Block a user