Show More
@@ -343,6 +343,11 b' def manifestmerge(repo, wctx, p2, pa, br' | |||
|
343 | 343 | else: |
|
344 | 344 | actions.append((f, "g", (fl2,), "remote created")) |
|
345 | 345 | elif n2 and n2 != ma[f]: |
|
346 | different = _checkunknownfile(repo, wctx, p2, f) | |
|
347 | if not force and different: | |
|
348 | aborts.append((f, "ud")) | |
|
349 | else: | |
|
350 | # if different: old untracked f may be overwritten and lost | |
|
346 | 351 | prompts.append((f, "dc")) # prompt deleted/changed |
|
347 | 352 | |
|
348 | 353 | for f, m in sorted(aborts): |
@@ -85,3 +85,30 b' Reverting foo1 and bar:' | |||
|
85 | 85 | |
|
86 | 86 | $ hg diff |
|
87 | 87 | |
|
88 | Merge should not overwrite local file that is untracked after remove | |
|
89 | ||
|
90 | $ rm * | |
|
91 | $ hg up -qC | |
|
92 | $ hg rm bar | |
|
93 | $ hg ci -m 'remove bar' | |
|
94 | $ echo 'memories of buried pirate treasure' > bar | |
|
95 | $ hg merge | |
|
96 | bar: untracked file differs | |
|
97 | abort: untracked files in working directory differ from files in requested revision | |
|
98 | [255] | |
|
99 | $ cat bar | |
|
100 | memories of buried pirate treasure | |
|
101 | ||
|
102 | Those who use force will lose | |
|
103 | ||
|
104 | $ hg merge -f | |
|
105 | remote changed bar which local deleted | |
|
106 | use (c)hanged version or leave (d)eleted? c | |
|
107 | merging foo1 and foo to foo1 | |
|
108 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
109 | (branch merge, don't forget to commit) | |
|
110 | $ cat bar | |
|
111 | bleh | |
|
112 | $ hg st | |
|
113 | M bar | |
|
114 | M foo1 |
General Comments 0
You need to be logged in to leave comments.
Login now