Show More
@@ -29,7 +29,7 b' def checkcollision(mctx):' | |||
|
29 | 29 | % (fn, folded[fold])) |
|
30 | 30 | folded[fold] = fn |
|
31 | 31 | |
|
32 | def forgetremoved(wctx, mctx): | |
|
32 | def forgetremoved(wctx, mctx, branchmerge): | |
|
33 | 33 | """ |
|
34 | 34 | Forget removed files |
|
35 | 35 | |
@@ -38,13 +38,23 b' def forgetremoved(wctx, mctx):' | |||
|
38 | 38 | then we need to remove it from the dirstate, to prevent the |
|
39 | 39 | dirstate from listing the file when it is no longer in the |
|
40 | 40 | manifest. |
|
41 | ||
|
42 | If we're merging, and the other revision has removed a file | |
|
43 | that is not present in the working directory, we need to mark it | |
|
44 | as removed. | |
|
41 | 45 | """ |
|
42 | 46 | |
|
43 | 47 | action = [] |
|
44 | 48 | man = mctx.manifest() |
|
45 | for f in wctx.deleted() + wctx.removed(): | |
|
49 | state = branchmerge and 'r' or 'f' | |
|
50 | for f in wctx.deleted(): | |
|
46 | 51 | if f not in man: |
|
47 |
action.append((f, |
|
|
52 | action.append((f, state)) | |
|
53 | ||
|
54 | if not branchmerge: | |
|
55 | for f in wctx.removed(): | |
|
56 | if f not in man: | |
|
57 | action.append((f, "f")) | |
|
48 | 58 | |
|
49 | 59 | return action |
|
50 | 60 | |
@@ -608,8 +618,7 b' def update(repo, node, branchmerge, forc' | |||
|
608 | 618 | checkunknown(wc, p2) |
|
609 | 619 | if not util.checkfolding(repo.path): |
|
610 | 620 | checkcollision(p2) |
|
611 | if not branchmerge: | |
|
612 | action += forgetremoved(wc, p2) | |
|
621 | action += forgetremoved(wc, p2, branchmerge) | |
|
613 | 622 | action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
|
614 | 623 | |
|
615 | 624 | ### apply phase |
General Comments 0
You need to be logged in to leave comments.
Login now