Show More
@@ -363,22 +363,6 b' def updatefromremote(ui, repo, remotemar' | |||
|
363 | 363 | writer(msg) |
|
364 | 364 | localmarks.write() |
|
365 | 365 | |
|
366 | def updateremote(ui, repo, remote, revs): | |
|
367 | ui.debug("checking for updated bookmarks\n") | |
|
368 | revnums = map(repo.changelog.rev, revs or []) | |
|
369 | ancestors = [a for a in repo.changelog.ancestors(revnums, inclusive=True)] | |
|
370 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid | |
|
371 | ) = compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), | |
|
372 | srchex=hex) | |
|
373 | ||
|
374 | for b, scid, dcid in advsrc: | |
|
375 | if ancestors and repo[scid].rev() not in ancestors: | |
|
376 | continue | |
|
377 | if remote.pushkey('bookmarks', b, dcid, scid): | |
|
378 | ui.status(_("updating bookmark %s\n") % b) | |
|
379 | else: | |
|
380 | ui.warn(_('updating bookmark %s failed!\n') % b) | |
|
381 | ||
|
382 | 366 | def pushtoremote(ui, repo, remote, targets): |
|
383 | 367 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid |
|
384 | 368 | ) = compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), |
@@ -255,5 +255,22 b' def push(repo, remote, force=False, revs' | |||
|
255 | 255 | if locallock is not None: |
|
256 | 256 | locallock.release() |
|
257 | 257 | |
|
258 |
bookmark |
|
|
258 | _pushbookmark(pushop.ui, unfi, pushop.remote, pushop.revs) | |
|
259 | 259 | return ret |
|
260 | ||
|
261 | def _pushbookmark(ui, repo, remote, revs): | |
|
262 | """Update bookmark position on remote""" | |
|
263 | ui.debug("checking for updated bookmarks\n") | |
|
264 | revnums = map(repo.changelog.rev, revs or []) | |
|
265 | ancestors = [a for a in repo.changelog.ancestors(revnums, inclusive=True)] | |
|
266 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid | |
|
267 | ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), | |
|
268 | srchex=hex) | |
|
269 | ||
|
270 | for b, scid, dcid in advsrc: | |
|
271 | if ancestors and repo[scid].rev() not in ancestors: | |
|
272 | continue | |
|
273 | if remote.pushkey('bookmarks', b, dcid, scid): | |
|
274 | ui.status(_("updating bookmark %s\n") % b) | |
|
275 | else: | |
|
276 | ui.warn(_('updating bookmark %s failed!\n') % b) |
General Comments 0
You need to be logged in to leave comments.
Login now