##// END OF EJS Templates
bookmarks: pull new bookmarks from remote by default (BC)
Levi Bard -
r16697:c285aae1 default
parent child Browse files
Show More
@@ -221,6 +221,11 b' def updatefromremote(ui, repo, remote, p'
221 221 repo._bookmarks[n] = cr.node()
222 222 changed = True
223 223 ui.warn(_("divergent bookmark %s stored as %s\n") % (k, n))
224 elif rb[k] in repo:
225 # add remote bookmarks for changes we already have
226 repo._bookmarks[k] = repo[rb[k]].node()
227 changed = True
228 ui.status(_("adding remote bookmark %s\n") % k)
224 229
225 230 if changed:
226 231 write(repo)
@@ -29,9 +29,13 b' import bookmark by name'
29 29 adding file changes
30 30 added 1 changesets with 1 changes to 1 files
31 31 updating bookmark Y
32 adding remote bookmark X
33 adding remote bookmark Z
32 34 (run 'hg update' to get a working copy)
33 35 $ hg bookmarks
36 X 0:4e3505fd9583
34 37 Y 0:4e3505fd9583
38 Z 0:4e3505fd9583
35 39 $ hg debugpushkey ../a namespaces
36 40 bookmarks
37 41 phases
@@ -47,6 +51,7 b' import bookmark by name'
47 51 $ hg bookmark
48 52 X 0:4e3505fd9583
49 53 Y 0:4e3505fd9583
54 Z 0:4e3505fd9583
50 55
51 56 export bookmark by name
52 57
@@ -111,6 +116,7 b' divergent bookmarks'
111 116 $ hg book
112 117 * X 1:9b140be10808
113 118 Y 0:4e3505fd9583
119 Z 0:4e3505fd9583
114 120 foo -1:000000000000
115 121 foobar 1:9b140be10808
116 122
@@ -122,11 +128,13 b' divergent bookmarks'
122 128 adding file changes
123 129 added 1 changesets with 1 changes to 1 files (+1 heads)
124 130 divergent bookmark X stored as X@foo
131 updating bookmark Z
125 132 (run 'hg heads' to see heads, 'hg merge' to merge)
126 133 $ hg book
127 134 * X 1:9b140be10808
128 135 X@foo 2:0d2164f0ce0d
129 136 Y 0:4e3505fd9583
137 Z 2:0d2164f0ce0d
130 138 foo -1:000000000000
131 139 foobar 1:9b140be10808
132 140 $ hg push -f ../a
@@ -159,13 +167,15 b' hgweb'
159 167 namespaces
160 168 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
161 169 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
162 X 9b140be1080824d768c5a4691a564088eede71f9
170 foobar 9b140be1080824d768c5a4691a564088eede71f9
171 Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c
163 172 foo 0000000000000000000000000000000000000000
164 foobar 9b140be1080824d768c5a4691a564088eede71f9
173 X 9b140be1080824d768c5a4691a564088eede71f9
165 174 $ hg out -B http://localhost:$HGPORT/
166 175 comparing with http://localhost:$HGPORT/
167 176 searching for changed bookmarks
168 Z 0d2164f0ce0d
177 no changed bookmarks found
178 [1]
169 179 $ hg push -B Z http://localhost:$HGPORT/
170 180 pushing to http://localhost:$HGPORT/
171 181 searching for changes
@@ -182,6 +192,9 b' hgweb'
182 192 $ hg pull -B Z http://localhost:$HGPORT/
183 193 pulling from http://localhost:$HGPORT/
184 194 no changes found
195 adding remote bookmark foobar
196 adding remote bookmark Z
197 adding remote bookmark foo
185 198 divergent bookmark X stored as X@1
186 199 importing bookmark Z
187 200 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
@@ -195,6 +195,7 b' listkeys hook'
195 195 no changes found
196 196 listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
197 197 listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
198 adding remote bookmark bar
198 199 importing bookmark bar
199 200 $ cd ../a
200 201
@@ -279,6 +280,7 b' outgoing hooks can see env vars'
279 280 adding manifests
280 281 adding file changes
281 282 added 1 changesets with 1 changes to 1 files
283 adding remote bookmark quux
282 284 (run 'hg update' to get a working copy)
283 285 $ hg rollback
284 286 repository tip rolled back to revision 3 (undo pull)
@@ -447,6 +449,7 b' test python hooks'
447 449 adding manifests
448 450 adding file changes
449 451 added 1 changesets with 1 changes to 1 files
452 adding remote bookmark quux
450 453 (run 'hg update' to get a working copy)
451 454
452 455 make sure --traceback works
General Comments 0
You need to be logged in to leave comments. Login now