##// END OF EJS Templates
merge: avoid double deletion mentioned in issue636
Matt Mackall -
r5059:8d9bdcbb default
parent child Browse files
Show More
@@ -0,0 +1,30 b''
1 #!/bin/sh
2
3 mkdir t
4 cd t
5 hg init
6
7 echo 1 > a
8 hg ci -qAm "first" -d "1000000 0"
9
10 hg cp a b
11 hg mv a c
12 echo 2 >> b
13 echo 2 >> c
14
15 hg ci -qAm "second" -d "1000000 0"
16
17 hg co -C 0
18
19 echo 0 > a
20 echo 1 >> a
21
22 hg ci -qAm "other" -d "1000000 0"
23
24 hg merge --debug
25
26 echo "-- b --"
27 cat b
28
29 echo "-- c --"
30 cat c
@@ -0,0 +1,23 b''
1 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
2 resolving manifests
3 overwrite None partial False
4 ancestor 583c7b748052 local fb3948d97f07+ remote 40da226db0f0
5 a: remote moved to c -> m
6 a: remote moved to b -> m
7 copying a to b
8 copying a to c
9 merging a and b
10 my a@fb3948d97f07+ other b@40da226db0f0 ancestor a@583c7b748052
11 removing a
12 merging a and c
13 my a@fb3948d97f07+ other c@40da226db0f0 ancestor a@583c7b748052
14 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
15 (branch merge, don't forget to commit)
16 -- b --
17 0
18 1
19 2
20 -- c --
21 0
22 1
23 2
@@ -415,10 +415,10 b' def applyupdates(repo, action, wctx, mct'
415 415 updated += 1
416 416 else:
417 417 merged += 1
418 if f != fd and move:
418 util.set_exec(repo.wjoin(fd), "x" in flags)
419 if f != fd and move and util.lexists(repo.wjoin(f)):
419 420 repo.ui.debug(_("removing %s\n") % f)
420 421 os.unlink(repo.wjoin(f))
421 util.set_exec(repo.wjoin(fd), "x" in flags)
422 422 elif m == "g": # get
423 423 flags = a[2]
424 424 repo.ui.note(_("getting %s\n") % f)
General Comments 0
You need to be logged in to leave comments. Login now