##// END OF EJS Templates
merge: fix adding untracked files on directory rename (issue612)...
Matt Mackall -
r4819:97971245 default
parent child Browse files
Show More
@@ -0,0 +1,24 b''
1 #!/bin/sh
2
3 mkdir t
4 cd t
5
6 hg init
7 mkdir src
8 echo a > src/a.c
9 hg ci -Ama -d "10000000 0"
10
11 hg mv src source
12 hg ci -Ammove -d "1000000 0"
13
14 hg co -C 0
15 echo new > src/a.c
16 echo compiled > src/a.o
17 hg ci -mupdate -d "1000000 0"
18
19 hg st
20
21 hg merge
22
23 hg st
24
@@ -0,0 +1,11 b''
1 adding src/a.c
2 copying src/a.c to source/a.c
3 removing src/a.c
4 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5 ? src/a.o
6 merging src/a.c and source/a.c
7 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
8 (branch merge, don't forget to commit)
9 M source/a.c
10 R src/a.c
11 ? source/a.o
@@ -478,6 +478,9 b' def recordupdates(repo, action, branchme'
478 478 repo.dirstate.forget([f])
479 479 elif m == "d": # directory rename
480 480 f2, fd, flag = a[2:]
481 if not f2 and f not in repo.dirstate:
482 # untracked file moved
483 continue
481 484 if branchmerge:
482 485 repo.dirstate.update([fd], 'a')
483 486 if f:
General Comments 0
You need to be logged in to leave comments. Login now