Mercurial > hg
annotate tests/test-fetch.t @ 46226:0826d684a1b5
test: replace a many occurence of `python` with `$PYTHON`
Otherwise this can use the wrong python version, or worse, not find any python
at all.
Differential Revision: https://phab.mercurial-scm.org/D9730
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 12 Jan 2021 22:43:55 +0100 |
parents | 527ce85c2e60 |
children |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21406
diff
changeset
|
1 #require serve |
15446
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 | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
33 new changesets d2ae7f538514 |
12426 | 34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
35 $ hg --cwd b parents -q | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
36 1:d2ae7f538514 |
12426 | 37 $ echo c > c/c |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
38 $ hg --cwd c commit -Amc |
12426 | 39 adding c |
40 $ hg clone c d | |
41 updating to branch default | |
42 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
43 $ hg clone c e | |
44 updating to branch default | |
45 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
|
46 |
12426 | 47 We cannot use the default commit message if fetching from a local |
48 repo, because the path of the repo will be included in the commit | |
49 message, making every commit appear different. | |
50 should merge c into a | |
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
51 |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
52 $ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a |
12426 | 53 pulling from ../a |
54 searching for changes | |
55 adding changesets | |
56 adding manifests | |
57 adding file changes | |
58 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
59 new changesets d2ae7f538514 |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
60 updating to 2:d2ae7f538514 |
12426 | 61 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
|
62 merging with 1:d36c0562f908 |
12426 | 63 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
|
64 new changeset 3:a323a0c43ec4 merges remote changes with local |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
34661
diff
changeset
|
65 $ ls -A c |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
34661
diff
changeset
|
66 .hg |
12426 | 67 a |
68 b | |
69 c | |
28549 | 70 $ hg serve --cwd a -a localhost -p $HGPORT -d --pid-file=hg.pid |
12426 | 71 $ cat a/hg.pid >> "$DAEMON_PIDS" |
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
72 |
12426 | 73 fetch over http, no auth |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
74 (this also tests that editor is invoked if '--edit' is specified) |
5798
86f5d8f608b7
fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents:
2990
diff
changeset
|
75 |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
76 $ HGEDITOR=cat hg --cwd d fetch --edit http://localhost:$HGPORT/ |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
77 pulling from http://localhost:$HGPORT/ |
12426 | 78 searching for changes |
79 adding changesets | |
80 adding manifests | |
81 adding file changes | |
82 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
83 new changesets d2ae7f538514 |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
84 updating to 2:d2ae7f538514 |
12426 | 85 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
|
86 merging with 1:d36c0562f908 |
12426 | 87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
88 Automated merge with http://localhost:$HGPORT/ |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
89 |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
90 |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
91 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
92 HG: Leave message empty to abort commit. |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
93 HG: -- |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
94 HG: user: test |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
95 HG: branch merge |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
96 HG: branch 'default' |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
97 HG: changed c |
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 d 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/ |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
101 $ hg --cwd d status --rev 'tip^1' --rev tip |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
102 A c |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
103 $ hg --cwd d status --rev 'tip^2' --rev tip |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
104 A b |
6206
0b6f12495276
fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents:
5798
diff
changeset
|
105 |
12426 | 106 fetch over http with auth (should be hidden in desc) |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
107 (this also tests that editor is not invoked if '--edit' is not |
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
108 specified, even though commit message is not specified explicitly) |
6206
0b6f12495276
fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents:
5798
diff
changeset
|
109 |
21406
288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16913
diff
changeset
|
110 $ HGEDITOR=cat 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
|
111 pulling from http://user:***@localhost:$HGPORT/ |
12426 | 112 searching for changes |
113 adding changesets | |
114 adding manifests | |
115 adding file changes | |
116 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
117 new changesets d2ae7f538514 |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
118 updating to 2:d2ae7f538514 |
12426 | 119 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
|
120 merging with 1:d36c0562f908 |
12426 | 121 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
|
122 new changeset 3:* merges remote changes with local (glob) |
12426 | 123 $ hg --cwd e tip --template '{desc}\n' |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12535
diff
changeset
|
124 Automated merge with http://localhost:$HGPORT/ |
12426 | 125 $ hg clone a f |
126 updating to branch default | |
127 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
128 $ hg clone a g | |
129 updating to branch default | |
130 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
131 $ echo f > f/f | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
132 $ hg --cwd f ci -Amf |
12426 | 133 adding f |
134 $ echo g > g/g | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
135 $ hg --cwd g ci -Amg |
12426 | 136 adding g |
137 $ hg clone -q f h | |
138 $ 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
|
139 |
12426 | 140 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
|
141 |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
142 $ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f |
12426 | 143 pulling from ../f |
144 searching for changes | |
145 adding changesets | |
146 adding manifests | |
147 adding file changes | |
148 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
149 new changesets 6343ca3eff20 |
12426 | 150 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
|
151 merging with 3:6343ca3eff20 |
12426 | 152 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
|
153 new changeset 4:f7faa0b7d3c6 merges remote changes with local |
12426 | 154 $ 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
|
155 |
12426 | 156 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
|
157 |
12426 | 158 $ hg --cwd i fetch ../h |
22676
a014fdc97154
fetch: use cmdutil.bailifchanged()
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
22046
diff
changeset
|
159 abort: uncommitted changes |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44724
diff
changeset
|
160 [20] |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
161 |
12426 | 162 test fetch with named branches |
163 | |
164 $ hg init nbase | |
165 $ echo base > nbase/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
166 $ hg -R nbase ci -Am base |
12426 | 167 adding a |
168 $ hg -R nbase branch a | |
169 marked working directory as branch a | |
15615 | 170 (branches are permanent and global, did you want a bookmark?) |
12426 | 171 $ echo a > nbase/a |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
172 $ hg -R nbase ci -m a |
12426 | 173 $ hg -R nbase up -C 0 |
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
175 $ hg -R nbase branch b | |
176 marked working directory as branch b | |
177 $ echo b > nbase/b | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
178 $ hg -R nbase ci -Am b |
12426 | 179 adding b |
180 | |
181 pull in change on foreign branch | |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
182 |
12426 | 183 $ hg clone nbase n1 |
184 updating to branch default | |
185 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
186 $ hg clone nbase n2 | |
187 updating to branch default | |
188 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
189 $ hg -R n1 up -C a | |
190 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
191 $ echo aa > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
192 $ hg -R n1 ci -m a1 |
12426 | 193 $ hg -R n2 up -C b |
194 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
|
195 $ hg -R n2 fetch -m 'merge' n1 |
12426 | 196 pulling from n1 |
197 searching for changes | |
198 adding changesets | |
199 adding manifests | |
200 adding file changes | |
201 added 1 changesets with 1 changes to 1 files | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
202 new changesets 8fdc9284bbc5 |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
203 |
12426 | 204 parent should be 2 (no automatic update) |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
205 |
12426 | 206 $ hg -R n2 parents --template '{rev}\n' |
207 2 | |
208 $ rm -fr n1 n2 | |
209 | |
210 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
|
211 |
12426 | 212 $ hg clone nbase n1 |
213 updating to branch default | |
214 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
215 $ hg clone nbase n2 | |
216 updating to branch default | |
217 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
218 $ hg -R n1 up -C a | |
219 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
220 $ echo aa > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
221 $ hg -R n1 ci -m a1 |
12426 | 222 $ hg -R n1 up -C b |
223 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
224 $ echo bb > n1/b | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
225 $ hg -R n1 ci -m b1 |
12426 | 226 $ hg -R n2 up -C b |
227 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
|
228 $ hg -R n2 fetch -m 'merge' n1 |
12426 | 229 pulling from n1 |
230 searching for changes | |
231 adding changesets | |
232 adding manifests | |
233 adding file changes | |
234 added 2 changesets with 2 changes to 2 files | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
235 new changesets 8fdc9284bbc5:3c4a837a864f |
12426 | 236 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
|
237 |
12426 | 238 parent should be 4 (fast forward) |
239 | |
240 $ hg -R n2 parents --template '{rev}\n' | |
241 4 | |
242 $ rm -fr n1 n2 | |
243 | |
244 pull changes on foreign (2 new heads) and local (1 new head) branches | |
245 with a local change | |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
246 |
12426 | 247 $ hg clone nbase n1 |
248 updating to branch default | |
249 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 $ hg clone nbase n2 | |
251 updating to branch default | |
252 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
253 $ hg -R n1 up -C a | |
254 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
255 $ echo a1 > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
256 $ hg -R n1 ci -m a1 |
12426 | 257 $ hg -R n1 up -C b |
258 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
259 $ echo bb > n1/b | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
260 $ hg -R n1 ci -m b1 |
12426 | 261 $ hg -R n1 up -C 1 |
262 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
263 $ echo a2 > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
264 $ hg -R n1 ci -m a2 |
12426 | 265 created new head |
266 $ hg -R n2 up -C b | |
267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
268 $ echo change >> n2/c | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
269 $ hg -R n2 ci -A -m local |
12426 | 270 adding c |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
271 $ hg -R n2 fetch -d '0 0' -m 'merge' n1 |
12426 | 272 pulling from n1 |
273 searching for changes | |
274 adding changesets | |
275 adding manifests | |
276 adding file changes | |
277 added 3 changesets with 3 changes to 2 files (+2 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
278 new changesets d05ce59ff88d:a7954de24e4c |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
279 updating to 5:3c4a837a864f |
12426 | 280 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
|
281 merging with 3:1267f84a9ea5 |
12426 | 282 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
|
283 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
|
284 |
12426 | 285 parent should be 7 (new merge changeset) |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
286 |
12426 | 287 $ hg -R n2 parents --template '{rev}\n' |
288 7 | |
289 $ rm -fr n1 n2 | |
290 | |
291 pull in changes on foreign (merge of local branch) and local (2 new | |
292 heads) with a local change | |
7007
a6b74fbb5ce0
fetch: added support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6246
diff
changeset
|
293 |
12426 | 294 $ hg clone nbase n1 |
295 updating to branch default | |
296 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
297 $ hg clone nbase n2 | |
298 updating to branch default | |
299 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
300 $ hg -R n1 up -C a | |
301 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
302 $ hg -R n1 merge b | |
303 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
304 (branch merge, don't forget to commit) | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
305 $ hg -R n1 ci -m merge |
12426 | 306 $ hg -R n1 up -C 2 |
307 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
308 $ echo c > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
309 $ hg -R n1 ci -m c |
12426 | 310 $ hg -R n1 up -C 2 |
311 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
312 $ echo cc > n1/a | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
313 $ hg -R n1 ci -m cc |
12426 | 314 created new head |
315 $ hg -R n2 up -C b | |
316 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
317 $ echo change >> n2/b | |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
318 $ hg -R n2 ci -A -m local |
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 pulling from n1 |
321 searching for changes | |
322 adding changesets | |
323 adding manifests | |
324 adding file changes | |
325 added 3 changesets with 2 changes to 1 files (+2 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
326 new changesets b84e8d0f020f:3d3bf54f99c0 |
12426 | 327 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
|
328 [1] |
7049
6489ee64b522
fetch: use dirstate branch instead of first parents
Sune Foldager <cryo@cyanite.org>
parents:
7007
diff
changeset
|
329 |
12426 | 330 parent should be 3 (fetch did not merge anything) |
331 | |
332 $ hg -R n2 parents --template '{rev}\n' | |
333 3 | |
334 $ rm -fr n1 n2 | |
335 | |
336 pull in change on different branch than dirstate | |
337 | |
338 $ hg init n1 | |
339 $ echo a > n1/a | |
340 $ hg -R n1 ci -Am initial | |
341 adding a | |
342 $ hg clone n1 n2 | |
343 updating to branch default | |
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
345 $ echo b > n1/a | |
346 $ hg -R n1 ci -m next | |
347 $ hg -R n2 branch topic | |
348 marked working directory as branch topic | |
15615 | 349 (branches are permanent and global, did you want a bookmark?) |
15244
f6d5d01725db
tests: cleanup of test-fetch.t
Mads Kiilerich <mads@kiilerich.com>
parents:
15243
diff
changeset
|
350 $ hg -R n2 fetch -m merge n1 |
24368
55fd99a23fdc
fetch: use an abort hint where appropriate
Yuya Nishihara <yuya@tcha.org>
parents:
24365
diff
changeset
|
351 abort: working directory not at branch tip |
28964
9dcc9ed26d33
fetch: use single quotes around command hint
timeless <timeless@mozdev.org>
parents:
28549
diff
changeset
|
352 (use 'hg update' to check out branch tip) |
12426 | 353 [255] |
354 | |
355 parent should be 0 (fetch did not update or merge anything) | |
356 | |
357 $ hg -R n2 parents --template '{rev}\n' | |
358 0 | |
359 $ rm -fr n1 n2 | |
360 | |
361 test fetch with inactive branches | |
7855
aa1a87f7544f
regression test for issue1552
Benjamin Pollack <benjamin@bitquabit.com>
parents:
7344
diff
changeset
|
362 |
12426 | 363 $ hg init ib1 |
364 $ echo a > ib1/a | |
365 $ hg --cwd ib1 ci -Am base | |
366 adding a | |
367 $ hg --cwd ib1 branch second | |
368 marked working directory as branch second | |
15615 | 369 (branches are permanent and global, did you want a bookmark?) |
12426 | 370 $ echo b > ib1/b |
371 $ hg --cwd ib1 ci -Am onsecond | |
372 adding b | |
373 $ hg --cwd ib1 branch -f default | |
374 marked working directory as branch default | |
375 $ echo c > ib1/c | |
376 $ hg --cwd ib1 ci -Am newdefault | |
377 adding c | |
378 created new head | |
379 $ hg clone ib1 ib2 | |
380 updating to branch default | |
381 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
382 | |
383 fetch should succeed | |
384 | |
385 $ hg --cwd ib2 fetch ../ib1 | |
386 pulling from ../ib1 | |
387 searching for changes | |
388 no changes found | |
389 $ rm -fr ib1 ib2 | |
390 | |
391 test issue1726 | |
9093
0b2b269ba3d0
branch heads: fix regression introduced in e67e5b60e55f (issue1726)
Henrik Stuart <hg@hstuart.dk>
parents:
7855
diff
changeset
|
392 |
12426 | 393 $ hg init i1726r1 |
394 $ echo a > i1726r1/a | |
395 $ hg --cwd i1726r1 ci -Am base | |
396 adding a | |
397 $ hg clone i1726r1 i1726r2 | |
398 updating to branch default | |
399 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
400 $ echo b > i1726r1/a | |
401 $ hg --cwd i1726r1 ci -m second | |
402 $ echo c > i1726r2/a | |
403 $ hg --cwd i1726r2 ci -m third | |
404 $ HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | |
405 pulling from ../i1726r1 | |
406 searching for changes | |
407 adding changesets | |
408 adding manifests | |
409 adding file changes | |
410 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
411 new changesets 7837755a2789 |
12426 | 412 updating to 2:7837755a2789 |
413 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
414 merging with 1:d1f0c6c48ebd | |
415 merging a | |
416 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
417 new changeset 3:* merges remote changes with local (glob) | |
418 $ hg --cwd i1726r2 heads default --template '{rev}\n' | |
419 3 | |
10580
612c142b7a82
fetch: fix newheads calculation (issue2047)
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
420 |
12426 | 421 test issue2047 |
7344
58fd3c718ca4
tests: add killdaemons helper script
Matt Mackall <mpm@selenic.com>
parents:
7049
diff
changeset
|
422 |
12426 | 423 $ hg -q init i2047a |
424 $ cd i2047a | |
425 $ echo a > a | |
426 $ hg -q ci -Am a | |
427 $ hg -q branch stable | |
428 $ echo b > b | |
429 $ hg -q ci -Am b | |
430 $ cd .. | |
431 $ hg -q clone -r 0 i2047a i2047b | |
432 $ cd i2047b | |
433 $ hg fetch ../i2047a | |
434 pulling from ../i2047a | |
435 searching for changes | |
436 adding changesets | |
437 adding manifests | |
438 adding file changes | |
439 added 1 changesets with 1 changes to 1 files | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
28964
diff
changeset
|
440 new changesets c8735224de5c |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15623
diff
changeset
|
441 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15623
diff
changeset
|
442 $ cd .. |