diff -r 867c3649be5d -r 6ddc86eedc3b mercurial/dagutil.py --- a/mercurial/dagutil.py Fri Mar 13 14:20:13 2015 -0400 +++ b/mercurial/dagutil.py Fri Mar 13 17:00:06 2015 -0400 @@ -88,7 +88,10 @@ '''generic implementations for DAGs''' def ancestorset(self, starts, stops=None): - stops = stops and set(stops) or set() + if stops: + stops = set(stops) + else: + stops = set() seen = set() pending = list(starts) while pending: @@ -179,7 +182,10 @@ def ancestorset(self, starts, stops=None): rlog = self._revlog idx = rlog.index - stops = stops and set(stops) or set() + if stops: + stops = set(stops) + else: + stops = set() seen = set() pending = list(starts) while pending: