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