comparison tests/test-bookmarks-pushpull.t @ 16835:4267c840c481

bookmarks: allow existing remote bookmarks to become heads when pushing
author Levi Bard <levi@unity3d.com>
date Sun, 13 May 2012 10:21:27 +0200
parents c285aae10f6c
children f2719b387380
comparison
equal deleted inserted replaced
16834:cafd8a8fb713 16835:4267c840c481
147 $ hg -R ../a book 147 $ hg -R ../a book
148 * X 1:0d2164f0ce0d 148 * X 1:0d2164f0ce0d
149 Y 0:4e3505fd9583 149 Y 0:4e3505fd9583
150 Z 1:0d2164f0ce0d 150 Z 1:0d2164f0ce0d
151 151
152 update a remote bookmark from a non-head to a head
153
154 $ hg up -q Y
155 $ echo c3 > f2
156 $ hg ci -Am3
157 adding f2
158 created new head
159 $ hg push ../a
160 pushing to ../a
161 searching for changes
162 adding changesets
163 adding manifests
164 adding file changes
165 added 1 changesets with 1 changes to 1 files (+1 heads)
166 updating bookmark Y
167 $ hg -R ../a book
168 * X 1:0d2164f0ce0d
169 Y 3:f6fc62dde3c0
170 Z 1:0d2164f0ce0d
171
172 diverging a remote bookmark fails
173
174 $ hg up -q 4e3505fd9583
175 $ echo c4 > f2
176 $ hg ci -Am4
177 adding f2
178 created new head
179 $ hg book -f Y
180 $ hg push ../a
181 pushing to ../a
182 searching for changes
183 abort: push creates new remote head 4efff6d98829!
184 (did you forget to merge? use push -f to force)
185 [255]
186 $ hg -R ../a book
187 * X 1:0d2164f0ce0d
188 Y 3:f6fc62dde3c0
189 Z 1:0d2164f0ce0d
190
152 hgweb 191 hgweb
153 192
154 $ cat <<EOF > .hg/hgrc 193 $ cat <<EOF > .hg/hgrc
155 > [web] 194 > [web]
156 > push_ssl = false 195 > push_ssl = false
164 $ hg debugpushkey http://localhost:$HGPORT/ namespaces 203 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
165 bookmarks 204 bookmarks
166 phases 205 phases
167 namespaces 206 namespaces
168 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks 207 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
169 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 208 Y 4efff6d98829d9c824c621afd6e3f01865f5439f
170 foobar 9b140be1080824d768c5a4691a564088eede71f9 209 foobar 9b140be1080824d768c5a4691a564088eede71f9
171 Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c 210 Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c
172 foo 0000000000000000000000000000000000000000 211 foo 0000000000000000000000000000000000000000
173 X 9b140be1080824d768c5a4691a564088eede71f9 212 X 9b140be1080824d768c5a4691a564088eede71f9
174 $ hg out -B http://localhost:$HGPORT/ 213 $ hg out -B http://localhost:$HGPORT/
200 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks 239 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
201 requesting all changes 240 requesting all changes
202 adding changesets 241 adding changesets
203 adding manifests 242 adding manifests
204 adding file changes 243 adding file changes
205 added 3 changesets with 3 changes to 3 files (+1 heads) 244 added 5 changesets with 5 changes to 3 files (+3 heads)
206 updating to branch default 245 updating to branch default
207 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
208 $ hg -R cloned-bookmarks bookmarks 247 $ hg -R cloned-bookmarks bookmarks
209 X 1:9b140be10808 248 X 1:9b140be10808
210 Y 0:4e3505fd9583 249 Y 4:4efff6d98829
211 Z 2:0d2164f0ce0d 250 Z 2:0d2164f0ce0d
212 foo -1:000000000000 251 foo -1:000000000000
213 foobar 1:9b140be10808 252 foobar 1:9b140be10808
214 253
215 $ kill `cat ../hg.pid` 254 $ kill `cat ../hg.pid`