changeset 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
files mercurial/exchange.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri Aug 15 16:31:06 2014 -0700
+++ b/mercurial/exchange.py	Fri Aug 15 17:58:15 2014 -0700
@@ -617,8 +617,10 @@
     repo = pushop.repo.unfiltered()
     remote = pushop.remote
     ui.debug("checking for updated bookmarks\n")
-    revnums = map(repo.changelog.rev, pushop.revs or [])
-    ancestors = repo.changelog.ancestors(revnums, inclusive=True)
+    ancestors = ()
+    if pushop.revs:
+        revnums = map(repo.changelog.rev, pushop.revs)
+        ancestors = repo.changelog.ancestors(revnums, inclusive=True)
     (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
      ) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'),
                            srchex=hex)