mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
merge: move forgets to the beginning of the action list
Forgets need to be in the beginning of the action list, same as removes. This lets us avoid clashes in the dirstate where a directory is forgotten and a file with the same name is added, or vice versa.
This commit is contained in:
parent
e692055e06
commit
5fa78a0d83
@ -384,7 +384,7 @@ def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial,
|
||||
return actions
|
||||
|
||||
def actionkey(a):
|
||||
return a[1] == "r" and -1 or 0, a
|
||||
return a[1] in "rf" and -1 or 0, a
|
||||
|
||||
def getremove(repo, mctx, overwrite, args):
|
||||
"""apply usually-non-interactive updates to the working directory
|
||||
|
@ -136,5 +136,23 @@ Issue683: peculiarity with hg revert of an removed then added file
|
||||
M a
|
||||
A c
|
||||
? a.orig
|
||||
$ hg up -C
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
|
||||
forget and get should have the right order: added but missing dir should be
|
||||
forgotten before file with same name is added
|
||||
|
||||
$ echo file d > d
|
||||
$ hg add d
|
||||
$ hg ci -md
|
||||
$ hg rm d
|
||||
$ mkdir d
|
||||
$ echo a > d/a
|
||||
$ hg add d/a
|
||||
$ rm -r d
|
||||
$ hg up -C
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ cat d
|
||||
file d
|
||||
|
||||
$ cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user