##// END OF EJS Templates
merge: refactor unknown file conflict checking...
merge: refactor unknown file conflict checking Previously, we would do a full working directory walk including unknown files to perform a merge. In many cases, this was painful because unknown files greatly outnumbered tracked files and generally had no useful effect on the merge. Here we instead wait until we find a file in the destination that's not tracked locally and detect if it exists and is not ignored. This is usually cheaper but can be -more- expensive in the case where we're adding a huge number of files. On the other hand, the cost of statting the new files should be dwarfed by the cost of eventually writing them. In this version, case collisions are detected implicitly by os.path.exists and wctx[f] lookup.

File last commit:

r15447:9910f60a default
r16093:7e30f5f2 default
Show More
test-issue612.t
34 lines | 636 B | text/troff | Tads3Lexer
http://mercurial.selenic.com/bts/issue612
$ hg init
$ mkdir src
$ echo a > src/a.c
$ hg ci -Ama
adding src/a.c
$ hg mv src source
moving src/a.c to source/a.c (glob)
$ hg ci -Ammove
$ hg co -C 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo new > src/a.c
$ echo compiled > src/a.o
$ hg ci -mupdate
created new head
$ hg status
? src/a.o
$ hg merge
merging src/a.c and source/a.c to source/a.c
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status
M source/a.c
R src/a.c
? source/a.o