Mercurial > hg
comparison tests/test-url-rev.t @ 12300:ca31b0b2ac16
tests: unify test-url-rev
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 14 Sep 2010 16:42:02 +0200 |
parents | tests/test-url-rev@6c82beaaa11a |
children | b63f6422d2a7 |
comparison
equal
deleted
inserted
replaced
12299:a73684df0f8a | 12300:ca31b0b2ac16 |
---|---|
1 # test basic functionality of url#rev syntax | |
2 | |
3 $ hg init repo | |
4 $ cd repo | |
5 $ echo a > a | |
6 $ hg ci -qAm 'add a' | |
7 $ hg branch foo | |
8 marked working directory as branch foo | |
9 $ echo >> a | |
10 $ hg ci -m 'change a' | |
11 $ cd .. | |
12 | |
13 $ hg clone 'repo#foo' clone | |
14 requesting all changes | |
15 adding changesets | |
16 adding manifests | |
17 adding file changes | |
18 added 2 changesets with 2 changes to 1 files | |
19 updating to branch foo | |
20 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 | |
22 $ hg --cwd clone heads | |
23 changeset: 1:cd2a86ecc814 | |
24 branch: foo | |
25 tag: tip | |
26 user: test | |
27 date: Thu Jan 01 00:00:00 1970 +0000 | |
28 summary: change a | |
29 | |
30 changeset: 0:1f0dee641bb7 | |
31 user: test | |
32 date: Thu Jan 01 00:00:00 1970 +0000 | |
33 summary: add a | |
34 | |
35 $ hg --cwd clone parents | |
36 changeset: 1:cd2a86ecc814 | |
37 branch: foo | |
38 tag: tip | |
39 user: test | |
40 date: Thu Jan 01 00:00:00 1970 +0000 | |
41 summary: change a | |
42 | |
43 $ cat clone/.hg/hgrc | |
44 [paths] | |
45 default = .*/repo#foo | |
46 | |
47 Changing original repo: | |
48 | |
49 $ cd repo | |
50 | |
51 $ echo >> a | |
52 $ hg ci -m 'new head of branch foo' | |
53 | |
54 $ hg up -qC default | |
55 $ echo bar > bar | |
56 $ hg ci -qAm 'add bar' | |
57 | |
58 $ hg log | |
59 changeset: 3:4cd725637392 | |
60 tag: tip | |
61 parent: 0:1f0dee641bb7 | |
62 user: test | |
63 date: Thu Jan 01 00:00:00 1970 +0000 | |
64 summary: add bar | |
65 | |
66 changeset: 2:faba9097cad4 | |
67 branch: foo | |
68 user: test | |
69 date: Thu Jan 01 00:00:00 1970 +0000 | |
70 summary: new head of branch foo | |
71 | |
72 changeset: 1:cd2a86ecc814 | |
73 branch: foo | |
74 user: test | |
75 date: Thu Jan 01 00:00:00 1970 +0000 | |
76 summary: change a | |
77 | |
78 changeset: 0:1f0dee641bb7 | |
79 user: test | |
80 date: Thu Jan 01 00:00:00 1970 +0000 | |
81 summary: add a | |
82 | |
83 $ hg -q outgoing '../clone#foo' | |
84 2:faba9097cad4 | |
85 | |
86 $ hg -q push '../clone#foo' | |
87 | |
88 $ hg --cwd ../clone heads | |
89 changeset: 2:faba9097cad4 | |
90 branch: foo | |
91 tag: tip | |
92 user: test | |
93 date: Thu Jan 01 00:00:00 1970 +0000 | |
94 summary: new head of branch foo | |
95 | |
96 changeset: 0:1f0dee641bb7 | |
97 user: test | |
98 date: Thu Jan 01 00:00:00 1970 +0000 | |
99 summary: add a | |
100 | |
101 $ cd .. | |
102 | |
103 $ cd clone | |
104 $ hg rollback | |
105 rolling back to revision 1 (undo push) | |
106 | |
107 $ hg -q incoming | |
108 2:faba9097cad4 | |
109 | |
110 $ hg -q pull | |
111 | |
112 $ hg heads | |
113 changeset: 2:faba9097cad4 | |
114 branch: foo | |
115 tag: tip | |
116 user: test | |
117 date: Thu Jan 01 00:00:00 1970 +0000 | |
118 summary: new head of branch foo | |
119 | |
120 changeset: 0:1f0dee641bb7 | |
121 user: test | |
122 date: Thu Jan 01 00:00:00 1970 +0000 | |
123 summary: add a | |
124 | |
125 Pull should not have updated: | |
126 | |
127 $ hg parents -q | |
128 1:cd2a86ecc814 | |
129 | |
130 Going back to the default branch: | |
131 | |
132 $ hg up -C 0 | |
133 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
134 | |
135 $ hg parents | |
136 changeset: 0:1f0dee641bb7 | |
137 user: test | |
138 date: Thu Jan 01 00:00:00 1970 +0000 | |
139 summary: add a | |
140 | |
141 No new revs, no update: | |
142 | |
143 $ hg pull -qu | |
144 | |
145 $ hg parents -q | |
146 0:1f0dee641bb7 | |
147 | |
148 $ hg rollback | |
149 rolling back to revision 1 (undo pull) | |
150 | |
151 $ hg up -C 0 | |
152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
153 | |
154 $ hg parents -q | |
155 0:1f0dee641bb7 | |
156 | |
157 Pull -u takes us back to branch foo: | |
158 | |
159 $ hg pull -qu | |
160 | |
161 $ hg parents | |
162 changeset: 2:faba9097cad4 | |
163 branch: foo | |
164 tag: tip | |
165 user: test | |
166 date: Thu Jan 01 00:00:00 1970 +0000 | |
167 summary: new head of branch foo | |
168 | |
169 $ hg rollback | |
170 rolling back to revision 1 (undo pull) | |
171 | |
172 $ hg up -C 0 | |
173 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
174 | |
175 $ hg parents -q | |
176 0:1f0dee641bb7 | |
177 | |
178 $ hg heads -q | |
179 1:cd2a86ecc814 | |
180 0:1f0dee641bb7 | |
181 | |
182 $ hg pull -qur default default | |
183 | |
184 $ hg parents | |
185 changeset: 3:4cd725637392 | |
186 tag: tip | |
187 parent: 0:1f0dee641bb7 | |
188 user: test | |
189 date: Thu Jan 01 00:00:00 1970 +0000 | |
190 summary: add bar | |
191 | |
192 $ hg heads | |
193 changeset: 3:4cd725637392 | |
194 tag: tip | |
195 parent: 0:1f0dee641bb7 | |
196 user: test | |
197 date: Thu Jan 01 00:00:00 1970 +0000 | |
198 summary: add bar | |
199 | |
200 changeset: 2:faba9097cad4 | |
201 branch: foo | |
202 user: test | |
203 date: Thu Jan 01 00:00:00 1970 +0000 | |
204 summary: new head of branch foo | |
205 | |
206 |