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