Show More
@@ -0,0 +1,29 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | hg init repo | |
|
4 | cd repo | |
|
5 | ||
|
6 | echo foo > foo | |
|
7 | echo bar > bar | |
|
8 | hg ci -qAm 'add foo bar' | |
|
9 | ||
|
10 | echo foo2 >> foo | |
|
11 | echo bleh > bar | |
|
12 | hg ci -m 'change foo bar' | |
|
13 | ||
|
14 | hg up -qC 0 | |
|
15 | hg mv foo foo1 | |
|
16 | echo foo1 > foo1 | |
|
17 | hg cat foo >> foo1 | |
|
18 | hg ci -m 'mv foo foo1' | |
|
19 | ||
|
20 | hg merge | |
|
21 | hg debugstate --nodates | |
|
22 | hg st -q | |
|
23 | ||
|
24 | echo '% removing foo1 and bar' | |
|
25 | cp foo1 F | |
|
26 | cp bar B | |
|
27 | hg rm -f foo1 bar | |
|
28 | hg debugstate --nodates | |
|
29 | hg st -qC |
@@ -0,0 +1,15 b'' | |||
|
1 | merging foo1 and foo | |
|
2 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
3 | (branch merge, don't forget to commit) | |
|
4 | n 0 -2 bar | |
|
5 | m 644 14 foo1 | |
|
6 | copy: foo -> foo1 | |
|
7 | M bar | |
|
8 | M foo1 | |
|
9 | % removing foo1 and bar | |
|
10 | r 0 -2 bar | |
|
11 | r 0 -1 foo1 | |
|
12 | copy: foo -> foo1 | |
|
13 | R bar | |
|
14 | R foo1 | |
|
15 | foo |
@@ -270,8 +270,15 b' class dirstate(object):' | |||
|
270 | 270 | 'mark a file removed' |
|
271 | 271 | self._dirty = True |
|
272 | 272 | self._changepath(f, 'r') |
|
273 | self._map[f] = ('r', 0, 0, 0, 0) | |
|
274 |
if f in self._ |
|
|
273 | size = 0 | |
|
274 | if self._pl[1] != nullid and f in self._map: | |
|
275 | entry = self._map[f] | |
|
276 | if entry[0] == 'm': | |
|
277 | size = -1 | |
|
278 | elif entry[0] == 'n' and entry[2] == -2: | |
|
279 | size = -2 | |
|
280 | self._map[f] = ('r', 0, size, 0, 0) | |
|
281 | if size == 0 and f in self._copymap: | |
|
275 | 282 | del self._copymap[f] |
|
276 | 283 | |
|
277 | 284 | def merge(self, f): |
General Comments 0
You need to be logged in to leave comments.
Login now