author | Matt Mackall <mpm@selenic.com> |
Wed, 30 Nov 2011 16:20:07 -0600 | |
changeset 15588 | 632f4be4d1f3 |
parent 15446 | c5c9ca3719f9 |
child 15623 | fc8c7a5ccc4a |
permissions | -rw-r--r-- |
15446
c5c9ca3719f9
tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich <mads@kiilerich.com>
parents:
15244
diff
changeset
|
1 |
$ "$TESTDIR/hghave" serve || exit 80 |
c5c9ca3719f9
tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich <mads@kiilerich.com>
parents:
15244
diff
changeset
|
2 |
|
12426 | 3 |
$ echo "[extensions]" >> $HGRCPATH |
4 |
$ echo "fetch=" >> $HGRCPATH |
|
6246
35bf9c23e17a
adjust test-fetch output to non-default HGPORT, e.g. with run-tests.py -j
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6235
diff
changeset
|
5 |
|
12426 | 6 |
test fetch with default branches only |
2822
4f7abf341cd4
fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
7 |
|
12426 | 8 |
$ hg init a |
9 |
$ echo a > a/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
10 |
$ hg --cwd a commit -Ama |
12426 | 11 |
adding a |
12 |
$ hg clone a b |
|
13 |
updating to branch default |
|
14 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 |
$ hg clone a c |
|
16 |
updating to branch default |
|
17 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 |
$ echo b > a/b |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
19 |
$ hg --cwd a commit -Amb |
12426 | 20 |
adding b |
21 |
$ hg --cwd a parents -q |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
22 |
1:d2ae7f538514 |
2822
4f7abf341cd4
fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
23 |
|
12426 | 24 |
should pull one change |
2822
4f7abf341cd4
fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 |
|
12426 | 26 |
$ hg --cwd b fetch ../a |
27 |
pulling from ../a |
|
28 |
searching for changes |
|
29 |
adding changesets |
|
30 |
adding manifests |
|
31 |
adding file changes |
|
32 |
added 1 changesets with 1 changes to 1 files |
|
33 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 |
$ hg --cwd b parents -q |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
35 |
1:d2ae7f538514 |
12426 | 36 |
$ echo c > c/c |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
37 |
$ hg --cwd c commit -Amc |
12426 | 38 |
adding c |
39 |
$ hg clone c d |
|
40 |
updating to branch default |
|
41 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 |
$ hg clone c e |
|
43 |
updating to branch default |
|
44 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2822
4f7abf341cd4
fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
45 |
|
12426 | 46 |
We cannot use the default commit message if fetching from a local |
47 |
repo, because the path of the repo will be included in the commit |
|
48 |
message, making every commit appear different. |
|
49 |
should merge c into a |
|
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
50 |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
51 |
$ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a |
12426 | 52 |
pulling from ../a |
53 |
searching for changes |
|
54 |
adding changesets |
|
55 |
adding manifests |
|
56 |
adding file changes |
|
57 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
58 |
updating to 2:d2ae7f538514 |
12426 | 59 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
60 |
merging with 1:d36c0562f908 |
12426 | 61 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
62 |
new changeset 3:a323a0c43ec4 merges remote changes with local |
12426 | 63 |
$ ls c |
64 |
a |
|
65 |
b |
|
66 |
c |
|
67 |
$ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid |
|
68 |
$ cat a/hg.pid >> "$DAEMON_PIDS" |
|
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
69 |
|
12426 | 70 |
fetch over http, no auth |
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
71 |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
72 |
$ hg --cwd d fetch http://localhost:$HGPORT/ |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
73 |
pulling from http://localhost:$HGPORT/ |
12426 | 74 |
searching for changes |
75 |
adding changesets |
|
76 |
adding manifests |
|
77 |
adding file changes |
|
78 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
79 |
updating to 2:d2ae7f538514 |
12426 | 80 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
81 |
merging with 1:d36c0562f908 |
12426 | 82 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12535
975ec4ce961c
tests: fix test-fetch port number variability
Matt Mackall <mpm@selenic.com>
parents:
12426
diff
changeset
|
83 |
new changeset 3:* merges remote changes with local (glob) |
12426 | 84 |
$ hg --cwd d tip --template '{desc}\n' |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
85 |
Automated merge with http://localhost:$HGPORT/ |
6206
0b6f12495276
fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents:
5798
diff
changeset
|
86 |
|
12426 | 87 |
fetch over http with auth (should be hidden in desc) |
6206
0b6f12495276
fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents:
5798
diff
changeset
|
88 |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
89 |
$ hg --cwd e fetch http://user:password@localhost:$HGPORT/ |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
90 |
pulling from http://user:***@localhost:$HGPORT/ |
12426 | 91 |
searching for changes |
92 |
adding changesets |
|
93 |
adding manifests |
|
94 |
adding file changes |
|
95 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
96 |
updating to 2:d2ae7f538514 |
12426 | 97 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
98 |
merging with 1:d36c0562f908 |
12426 | 99 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12535
975ec4ce961c
tests: fix test-fetch port number variability
Matt Mackall <mpm@selenic.com>
parents:
12426
diff
changeset
|
100 |
new changeset 3:* merges remote changes with local (glob) |
12426 | 101 |
$ hg --cwd e tip --template '{desc}\n' |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
102 |
Automated merge with http://localhost:$HGPORT/ |
12426 | 103 |
$ hg clone a f |
104 |
updating to branch default |
|
105 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 |
$ hg clone a g |
|
107 |
updating to branch default |
|
108 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 |
$ echo f > f/f |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
110 |
$ hg --cwd f ci -Amf |
12426 | 111 |
adding f |
112 |
$ echo g > g/g |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
113 |
$ hg --cwd g ci -Amg |
12426 | 114 |
adding g |
115 |
$ hg clone -q f h |
|
116 |
$ hg clone -q g i |
|
6206
0b6f12495276
fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents:
5798
diff
changeset
|
117 |
|
12426 | 118 |
should merge f into g |
6226
bd61e44eb2cc
fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents:
6207
diff
changeset
|
119 |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
120 |
$ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f |
12426 | 121 |
pulling from ../f |
122 |
searching for changes |
|
123 |
adding changesets |
|
124 |
adding manifests |
|
125 |
adding file changes |
|
126 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
|
127 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
128 |
merging with 3:6343ca3eff20 |
12426 | 129 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
130 |
new changeset 4:f7faa0b7d3c6 merges remote changes with local |
12426 | 131 |
$ rm i/g |
6226
bd61e44eb2cc
fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents:
6207
diff
changeset
|
132 |
|
12426 | 133 |
should abort, because i is modified |
6235
d16798000be0
test-fetch failed due to non-zero exit code
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6226
diff
changeset
|
134 |
|
12426 | 135 |
$ hg --cwd i fetch ../h |
136 |
abort: working directory is missing some files |
|
137 |
[255] |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
138 |
|
12426 | 139 |
test fetch with named branches |
140 |
||
141 |
$ hg init nbase |
|
142 |
$ echo base > nbase/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
143 |
$ hg -R nbase ci -Am base |
12426 | 144 |
adding a |
145 |
$ hg -R nbase branch a |
|
146 |
marked working directory as branch a |
|
147 |
$ echo a > nbase/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
148 |
$ hg -R nbase ci -m a |
12426 | 149 |
$ hg -R nbase up -C 0 |
150 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
151 |
$ hg -R nbase branch b |
|
152 |
marked working directory as branch b |
|
153 |
$ echo b > nbase/b |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
154 |
$ hg -R nbase ci -Am b |
12426 | 155 |
adding b |
156 |
||
157 |
pull in change on foreign branch |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
158 |
|
12426 | 159 |
$ hg clone nbase n1 |
160 |
updating to branch default |
|
161 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
162 |
$ hg clone nbase n2 |
|
163 |
updating to branch default |
|
164 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
165 |
$ hg -R n1 up -C a |
|
166 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
167 |
$ echo aa > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
168 |
$ hg -R n1 ci -m a1 |
12426 | 169 |
$ hg -R n2 up -C b |
170 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
171 |
$ hg -R n2 fetch -m 'merge' n1 |
12426 | 172 |
pulling from n1 |
173 |
searching for changes |
|
174 |
adding changesets |
|
175 |
adding manifests |
|
176 |
adding file changes |
|
177 |
added 1 changesets with 1 changes to 1 files |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
178 |
|
12426 | 179 |
parent should be 2 (no automatic update) |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
180 |
|
12426 | 181 |
$ hg -R n2 parents --template '{rev}\n' |
182 |
2 |
|
183 |
$ rm -fr n1 n2 |
|
184 |
||
185 |
pull in changes on both foreign and local branches |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
186 |
|
12426 | 187 |
$ hg clone nbase n1 |
188 |
updating to branch default |
|
189 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
190 |
$ hg clone nbase n2 |
|
191 |
updating to branch default |
|
192 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 |
$ hg -R n1 up -C a |
|
194 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
195 |
$ echo aa > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
196 |
$ hg -R n1 ci -m a1 |
12426 | 197 |
$ hg -R n1 up -C b |
198 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
199 |
$ echo bb > n1/b |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
200 |
$ hg -R n1 ci -m b1 |
12426 | 201 |
$ hg -R n2 up -C b |
202 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
203 |
$ hg -R n2 fetch -m 'merge' n1 |
12426 | 204 |
pulling from n1 |
205 |
searching for changes |
|
206 |
adding changesets |
|
207 |
adding manifests |
|
208 |
adding file changes |
|
209 |
added 2 changesets with 2 changes to 2 files |
|
210 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
211 |
|
12426 | 212 |
parent should be 4 (fast forward) |
213 |
||
214 |
$ hg -R n2 parents --template '{rev}\n' |
|
215 |
4 |
|
216 |
$ rm -fr n1 n2 |
|
217 |
||
218 |
pull changes on foreign (2 new heads) and local (1 new head) branches |
|
219 |
with a local change |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
220 |
|
12426 | 221 |
$ hg clone nbase n1 |
222 |
updating to branch default |
|
223 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
224 |
$ hg clone nbase n2 |
|
225 |
updating to branch default |
|
226 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 |
$ hg -R n1 up -C a |
|
228 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
229 |
$ echo a1 > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
230 |
$ hg -R n1 ci -m a1 |
12426 | 231 |
$ hg -R n1 up -C b |
232 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
233 |
$ echo bb > n1/b |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
234 |
$ hg -R n1 ci -m b1 |
12426 | 235 |
$ hg -R n1 up -C 1 |
236 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
237 |
$ echo a2 > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
238 |
$ hg -R n1 ci -m a2 |
12426 | 239 |
created new head |
240 |
$ hg -R n2 up -C b |
|
241 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 |
$ echo change >> n2/c |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
243 |
$ hg -R n2 ci -A -m local |
12426 | 244 |
adding c |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
245 |
$ hg -R n2 fetch -d '0 0' -m 'merge' n1 |
12426 | 246 |
pulling from n1 |
247 |
searching for changes |
|
248 |
adding changesets |
|
249 |
adding manifests |
|
250 |
adding file changes |
|
251 |
added 3 changesets with 3 changes to 2 files (+2 heads) |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
252 |
updating to 5:3c4a837a864f |
12426 | 253 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
254 |
merging with 3:1267f84a9ea5 |
12426 | 255 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
256 |
new changeset 7:2cf2a1261f21 merges remote changes with local |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
257 |
|
12426 | 258 |
parent should be 7 (new merge changeset) |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
259 |
|
12426 | 260 |
$ hg -R n2 parents --template '{rev}\n' |
261 |
7 |
|
262 |
$ rm -fr n1 n2 |
|
263 |
||
264 |
pull in changes on foreign (merge of local branch) and local (2 new |
|
265 |
heads) with a local change |
|
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
266 |
|
12426 | 267 |
$ hg clone nbase n1 |
268 |
updating to branch default |
|
269 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
270 |
$ hg clone nbase n2 |
|
271 |
updating to branch default |
|
272 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 |
$ hg -R n1 up -C a |
|
274 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
275 |
$ hg -R n1 merge b |
|
276 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 |
(branch merge, don't forget to commit) |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
278 |
$ hg -R n1 ci -m merge |
12426 | 279 |
$ hg -R n1 up -C 2 |
280 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 |
$ echo c > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
282 |
$ hg -R n1 ci -m c |
12426 | 283 |
$ hg -R n1 up -C 2 |
284 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
285 |
$ echo cc > n1/a |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
286 |
$ hg -R n1 ci -m cc |
12426 | 287 |
created new head |
288 |
$ hg -R n2 up -C b |
|
289 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
290 |
$ echo change >> n2/b |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
291 |
$ hg -R n2 ci -A -m local |
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
292 |
$ hg -R n2 fetch -m 'merge' n1 |
12426 | 293 |
pulling from n1 |
294 |
searching for changes |
|
295 |
adding changesets |
|
296 |
adding manifests |
|
297 |
adding file changes |
|
298 |
added 3 changesets with 2 changes to 1 files (+2 heads) |
|
299 |
not merging with 1 other new branch heads (use "hg heads ." and "hg merge" to merge them) |
|
12711
b885f28fa4fa
fetch: fix and document exit codes (issue2356)
Matt Mackall <mpm@selenic.com>
parents:
12643
diff
changeset
|
300 |
[1] |
7049
6489ee64b522
fetch: use dirstate branch instead of first parents
Sune Foldager <cryo@cyanite.org>
parents:
7007
diff
changeset
|
301 |
|
12426 | 302 |
parent should be 3 (fetch did not merge anything) |
303 |
||
304 |
$ hg -R n2 parents --template '{rev}\n' |
|
305 |
3 |
|
306 |
$ rm -fr n1 n2 |
|
307 |
||
308 |
pull in change on different branch than dirstate |
|
309 |
||
310 |
$ hg init n1 |
|
311 |
$ echo a > n1/a |
|
312 |
$ hg -R n1 ci -Am initial |
|
313 |
adding a |
|
314 |
$ hg clone n1 n2 |
|
315 |
updating to branch default |
|
316 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
317 |
$ echo b > n1/a |
|
318 |
$ hg -R n1 ci -m next |
|
319 |
$ hg -R n2 branch topic |
|
320 |
marked working directory as branch topic |
|
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
321 |
$ hg -R n2 fetch -m merge n1 |
12426 | 322 |
abort: working dir not at branch tip (use "hg update" to check out branch tip) |
323 |
[255] |
|
324 |
||
325 |
parent should be 0 (fetch did not update or merge anything) |
|
326 |
||
327 |
$ hg -R n2 parents --template '{rev}\n' |
|
328 |
0 |
|
329 |
$ rm -fr n1 n2 |
|
330 |
||
331 |
test fetch with inactive branches |
|
7855
aa1a87f7544f
regression test for issue1552
Benjamin Pollack <benjamin@bitquabit.com>
parents:
7344
diff
changeset
|
332 |
|
12426 | 333 |
$ hg init ib1 |
334 |
$ echo a > ib1/a |
|
335 |
$ hg --cwd ib1 ci -Am base |
|
336 |
adding a |
|
337 |
$ hg --cwd ib1 branch second |
|
338 |
marked working directory as branch second |
|
339 |
$ echo b > ib1/b |
|
340 |
$ hg --cwd ib1 ci -Am onsecond |
|
341 |
adding b |
|
342 |
$ hg --cwd ib1 branch -f default |
|
343 |
marked working directory as branch default |
|
344 |
$ echo c > ib1/c |
|
345 |
$ hg --cwd ib1 ci -Am newdefault |
|
346 |
adding c |
|
347 |
created new head |
|
348 |
$ hg clone ib1 ib2 |
|
349 |
updating to branch default |
|
350 |
3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
351 |
||
352 |
fetch should succeed |
|
353 |
||
354 |
$ hg --cwd ib2 fetch ../ib1 |
|
355 |
pulling from ../ib1 |
|
356 |
searching for changes |
|
357 |
no changes found |
|
358 |
$ rm -fr ib1 ib2 |
|
359 |
||
360 |
test issue1726 |
|
9093
0b2b269ba3d0
branch heads: fix regression introduced in e67e5b60e55f (issue1726)
Henrik Stuart <hg@hstuart.dk>
parents:
7855
diff
changeset
|
361 |
|
12426 | 362 |
$ hg init i1726r1 |
363 |
$ echo a > i1726r1/a |
|
364 |
$ hg --cwd i1726r1 ci -Am base |
|
365 |
adding a |
|
366 |
$ hg clone i1726r1 i1726r2 |
|
367 |
updating to branch default |
|
368 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
369 |
$ echo b > i1726r1/a |
|
370 |
$ hg --cwd i1726r1 ci -m second |
|
371 |
$ echo c > i1726r2/a |
|
372 |
$ hg --cwd i1726r2 ci -m third |
|
373 |
$ HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 |
|
374 |
pulling from ../i1726r1 |
|
375 |
searching for changes |
|
376 |
adding changesets |
|
377 |
adding manifests |
|
378 |
adding file changes |
|
379 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
|
380 |
updating to 2:7837755a2789 |
|
381 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
382 |
merging with 1:d1f0c6c48ebd |
|
383 |
merging a |
|
384 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
385 |
new changeset 3:* merges remote changes with local (glob) |
|
386 |
$ hg --cwd i1726r2 heads default --template '{rev}\n' |
|
387 |
3 |
|
10580
612c142b7a82
fetch: fix newheads calculation (issue2047)
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
388 |
|
12426 | 389 |
test issue2047 |
7344
58fd3c718ca4
tests: add killdaemons helper script
Matt Mackall <mpm@selenic.com>
parents:
7049
diff
changeset
|
390 |
|
12426 | 391 |
$ hg -q init i2047a |
392 |
$ cd i2047a |
|
393 |
$ echo a > a |
|
394 |
$ hg -q ci -Am a |
|
395 |
$ hg -q branch stable |
|
396 |
$ echo b > b |
|
397 |
$ hg -q ci -Am b |
|
398 |
$ cd .. |
|
399 |
$ hg -q clone -r 0 i2047a i2047b |
|
400 |
$ cd i2047b |
|
401 |
$ hg fetch ../i2047a |
|
402 |
pulling from ../i2047a |
|
403 |
searching for changes |
|
404 |
adding changesets |
|
405 |
adding manifests |
|
406 |
adding file changes |
|
407 |
added 1 changesets with 1 changes to 1 files |