| 1 |
Test for changeset 9fe267f77f56ff127cf7e65dc15dd9de71ce8ceb |
| 2 |
(merge correctly when all the files in a directory are moved |
| 3 |
but then local changes are added in the same directory) |
| 4 |
|
| 5 |
$ hg init a |
| 6 |
$ cd a |
| 7 |
$ mkdir -p testdir |
| 8 |
$ echo a > testdir/a |
| 9 |
$ hg add testdir/a |
| 10 |
$ hg commit -m a |
| 11 |
$ cd .. |
| 12 |
|
| 13 |
$ hg clone a b |
| 14 |
updating to branch default |
| 15 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 16 |
$ cd a |
| 17 |
$ echo alpha > testdir/a |
| 18 |
$ hg commit -m remote-change |
| 19 |
$ cd .. |
| 20 |
|
| 21 |
$ cd b |
| 22 |
$ mkdir testdir/subdir |
| 23 |
$ hg mv testdir/a testdir/subdir/a |
| 24 |
$ hg commit -m move |
| 25 |
$ mkdir newdir |
| 26 |
$ echo beta > newdir/beta |
| 27 |
$ hg add newdir/beta |
| 28 |
$ hg commit -m local-addition |
| 29 |
$ hg pull ../a |
| 30 |
pulling from ../a |
| 31 |
searching for changes |
| 32 |
adding changesets |
| 33 |
adding manifests |
| 34 |
adding file changes |
| 35 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
| 36 |
new changesets cc7000b01af9 |
| 37 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 38 |
$ hg up -C 2 |
| 39 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 40 |
Abuse this test for also testing that merge respects ui.relative-paths |
| 41 |
$ hg --cwd testdir merge --config ui.relative-paths=yes |
| 42 |
merging subdir/a and a to subdir/a |
| 43 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 44 |
(branch merge, don't forget to commit) |
| 45 |
$ hg stat |
| 46 |
M testdir/subdir/a |
| 47 |
$ hg diff --nodates |
| 48 |
diff -r bc21c9773bfa testdir/subdir/a |
| 49 |
--- a/testdir/subdir/a |
| 50 |
+++ b/testdir/subdir/a |
| 51 |
@@ -1,1 +1,1 @@ |
| 52 |
-a |
| 53 |
+alpha |
| 54 |
|
| 55 |
$ cd .. |