Mercurial > hg
annotate tests/test-pathconflicts-merge.t @ 44395:382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
I'm about to change `hg debugmergestate` and it broke on these "pu"
and "pr" records on my first attempt (D8113), so let's add test
coverage.
Differential Revision: https://phab.mercurial-scm.org/D8119
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 13 Feb 2020 21:55:38 -0800 |
parents | a8a0cafcef79 |
children | acbfa31cfaf2 |
rev | line source |
---|---|
34942
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
1 Path conflict checking is currently disabled by default because of issue5716. |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
2 Turn it on for this test. |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
3 |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
4 $ cat >> $HGRCPATH << EOF |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
5 > [experimental] |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
6 > merge.checkpathconflicts=True |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
7 > EOF |
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34571
diff
changeset
|
8 |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
9 $ hg init repo |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
10 $ cd repo |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
11 $ echo base > base |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
12 $ hg add base |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
13 $ hg commit -m "base" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
14 $ hg bookmark -i base |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
15 $ mkdir a |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
16 $ echo 1 > a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
17 $ hg add a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
18 $ hg commit -m "file" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
19 $ hg bookmark -i file |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
20 $ echo 2 > a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
21 $ hg commit -m "file2" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
22 $ hg bookmark -i file2 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
23 $ hg up 0 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
37114
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
25 |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
26 #if symlink |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
27 $ mkdir a |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
28 $ ln -s c a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
29 $ hg add a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
30 $ hg commit -m "link" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
31 created new head |
37114
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
32 #else |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
33 $ hg import -q --bypass - <<EOF |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
34 > # HG changeset patch |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
35 > link |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
36 > |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
37 > diff --git a/a/b b/a/b |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
38 > new file mode 120000 |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
39 > --- /dev/null |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
40 > +++ b/a/b |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
41 > @@ -0,0 +1,1 @@ |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
42 > +c |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
43 > \ No newline at end of file |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
44 > EOF |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
45 $ hg up -q |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
46 #endif |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
47 |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
48 $ hg bookmark -i link |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
49 $ hg up 0 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
50 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
51 $ mkdir -p a/b/c |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
52 $ echo 2 > a/b/c/d |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
53 $ hg add a/b/c/d |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
54 $ hg commit -m "dir" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
55 created new head |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
56 $ hg bookmark -i dir |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
57 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
58 Merge - local file conflicts with remote directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
59 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
60 $ hg up file |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
61 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
62 (activating bookmark file) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
63 $ hg bookmark -i |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
64 $ hg merge --verbose dir |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
65 resolving manifests |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
66 a/b: path conflict - a file or link has the same name as a directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
67 the local file has been renamed to a/b~0ed027b96f31 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
68 resolve manually then use 'hg resolve --mark a/b' |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34942
diff
changeset
|
69 moving a/b to a/b~0ed027b96f31 |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
70 getting a/b/c/d |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
71 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35437
diff
changeset
|
72 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
73 [1] |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
74 $ hg status |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
75 M a/b/c/d |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
76 A a/b~0ed027b96f31 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
77 R a/b |
44395
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
78 $ hg debugmergestate |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
79 * version 2 records |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
80 local: 0ed027b96f31a2560c8abe689ba59876409a2b8e |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
81 other: 9049d9534d5c5d16264aab02b4b9e20d03faabef |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
82 labels: |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
83 local: working copy |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
84 other: merge rev |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
85 unrecognized entry: P a/b pu a/b~0ed027b96f31 l |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
86 $ hg resolve --all |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
87 a/b: path conflict must be resolved manually |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
88 $ hg forget a/b~0ed027b96f31 && rm a/b~0ed027b96f31 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
89 $ hg resolve --mark a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
90 (no more unresolved files) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
91 $ hg commit -m "merge file and dir (deleted file)" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
92 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
93 Merge - local symlink conflicts with remote directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
94 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
95 $ hg up link |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
96 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
97 (activating bookmark link) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
98 $ hg bookmark -i |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
99 $ hg merge dir |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
100 a/b: path conflict - a file or link has the same name as a directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
101 the local file has been renamed to a/b~2ea68033e3be |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
102 resolve manually then use 'hg resolve --mark a/b' |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
103 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35437
diff
changeset
|
104 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
105 [1] |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
106 $ hg status |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
107 M a/b/c/d |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
108 A a/b~2ea68033e3be |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
109 R a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
110 $ hg resolve --list |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
111 P a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
112 $ hg resolve --all |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
113 a/b: path conflict must be resolved manually |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
114 $ hg mv a/b~2ea68033e3be a/b.old |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
115 $ hg resolve --mark a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
116 (no more unresolved files) |
44395
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
117 $ hg debugmergestate |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
118 * version 2 records |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
119 local: 2ea68033e3be03a560471c1fc9e5704fbedb9b4b |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
120 other: 9049d9534d5c5d16264aab02b4b9e20d03faabef |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
121 labels: |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
122 local: working copy |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
123 other: merge rev |
382f4f09f0bd
tests: add tests of debugmergestate with unresolved/resolved path conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
37114
diff
changeset
|
124 unrecognized entry: P a/b pr a/b~2ea68033e3be l |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
125 $ hg resolve --list |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
126 R a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
127 $ hg commit -m "merge link and dir (renamed link)" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
128 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
129 Merge - local directory conflicts with remote file or link |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
130 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
131 $ hg up dir |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
132 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
133 (activating bookmark dir) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
134 $ hg bookmark -i |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
135 $ hg merge file |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
136 a/b: path conflict - a file or link has the same name as a directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
137 the remote file has been renamed to a/b~0ed027b96f31 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
138 resolve manually then use 'hg resolve --mark a/b' |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
139 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35437
diff
changeset
|
140 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
141 [1] |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
142 $ hg status |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
143 A a/b~0ed027b96f31 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
144 $ hg resolve --all |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
145 a/b: path conflict must be resolved manually |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
146 $ hg mv a/b~0ed027b96f31 a/b/old-b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
147 $ hg resolve --mark a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
148 (no more unresolved files) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
149 $ hg commit -m "merge dir and file (move file into dir)" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
150 created new head |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
151 $ hg merge file2 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
152 merging a/b/old-b and a/b to a/b/old-b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
153 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
154 (branch merge, don't forget to commit) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
155 $ cat a/b/old-b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
156 2 |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
157 $ hg commit -m "merge file2 (copytrace tracked rename)" |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
158 $ hg merge link |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
159 a/b: path conflict - a file or link has the same name as a directory |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
160 the remote file has been renamed to a/b~2ea68033e3be |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
161 resolve manually then use 'hg resolve --mark a/b' |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
162 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35437
diff
changeset
|
163 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
164 [1] |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
165 $ hg mv a/b~2ea68033e3be a/b.old |
37114
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
166 |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
167 #if symlink |
34571
75bd034a1e00
tests: use readlink.py instead of readlink
Augie Fackler <augie@google.com>
parents:
34558
diff
changeset
|
168 $ readlink.py a/b.old |
75bd034a1e00
tests: use readlink.py instead of readlink
Augie Fackler <augie@google.com>
parents:
34558
diff
changeset
|
169 a/b.old -> c |
37114
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
170 #else |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
171 $ cat a/b.old |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
172 c (no-eol) |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
173 #endif |
a8a0cafcef79
test-pathconflicts-merge: stop requiring symlink support
Matt Harbison <matt_harbison@yahoo.com>
parents:
35704
diff
changeset
|
174 |
34558
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
175 $ hg resolve --mark a/b |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
176 (no more unresolved files) |
f71c712ebdec
tests: add test for path conflicts during merge
Mark Thomas <mbthomas@fb.com>
parents:
diff
changeset
|
177 $ hg commit -m "merge link (rename link)" |