Mercurial > hg
comparison mercurial/exchange.py @ 22227:98cbd41cb532
pushbookmark: remove a <cond> and <val> or <other> construct
We make the conditional explicit for the sake of readability.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 15 Aug 2014 17:58:15 -0700 |
parents | 827bce9e24fb |
children | a3dc2d385490 |
comparison
equal
deleted
inserted
replaced
22226:827bce9e24fb | 22227:98cbd41cb532 |
---|---|
615 """Update bookmark position on remote""" | 615 """Update bookmark position on remote""" |
616 ui = pushop.ui | 616 ui = pushop.ui |
617 repo = pushop.repo.unfiltered() | 617 repo = pushop.repo.unfiltered() |
618 remote = pushop.remote | 618 remote = pushop.remote |
619 ui.debug("checking for updated bookmarks\n") | 619 ui.debug("checking for updated bookmarks\n") |
620 revnums = map(repo.changelog.rev, pushop.revs or []) | 620 ancestors = () |
621 ancestors = repo.changelog.ancestors(revnums, inclusive=True) | 621 if pushop.revs: |
622 revnums = map(repo.changelog.rev, pushop.revs) | |
623 ancestors = repo.changelog.ancestors(revnums, inclusive=True) | |
622 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid | 624 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid |
623 ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), | 625 ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'), |
624 srchex=hex) | 626 srchex=hex) |
625 | 627 |
626 for b, scid, dcid in advsrc: | 628 for b, scid, dcid in advsrc: |