comparison mercurial/exchange.py @ 22238:c894fdff56d1

pushbookmark: split an ultra-long line into a saner version We make a temporary variable for the remote bookmark data and we do not expand all elements from `bookmark.compare` since we are going to use only one.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 15 Aug 2014 18:02:54 -0700
parents a3dc2d385490
children 0688010ee38f
comparison
equal deleted inserted replaced
22237:808926c76cac 22238:c894fdff56d1
621 ui.debug("checking for updated bookmarks\n") 621 ui.debug("checking for updated bookmarks\n")
622 ancestors = () 622 ancestors = ()
623 if pushop.revs: 623 if pushop.revs:
624 revnums = map(repo.changelog.rev, pushop.revs) 624 revnums = map(repo.changelog.rev, pushop.revs)
625 ancestors = repo.changelog.ancestors(revnums, inclusive=True) 625 ancestors = repo.changelog.ancestors(revnums, inclusive=True)
626 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid 626 remotebookmark = remote.listkeys('bookmarks')
627 ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), 627 comp = bookmarks.compare(repo, repo._bookmarks, remotebookmark, srchex=hex)
628 srchex=hex) 628 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid) = comp
629
630 for b, scid, dcid in advsrc: 629 for b, scid, dcid in advsrc:
631 if ancestors and repo[scid].rev() not in ancestors: 630 if ancestors and repo[scid].rev() not in ancestors:
632 continue 631 continue
633 if remote.pushkey('bookmarks', b, dcid, scid): 632 if remote.pushkey('bookmarks', b, dcid, scid):
634 ui.status(_("updating bookmark %s\n") % b) 633 ui.status(_("updating bookmark %s\n") % b)