comparison mercurial/revset.py @ 22828:966860f7a1a8

baseset: fix isascending and isdescending We now have sufficient information to return the proper value there.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 03 Oct 2014 03:31:05 -0500
parents c1107cb21df2
children 36e09c25f870
comparison
equal deleted inserted replaced
22827:c1107cb21df2 22828:966860f7a1a8
2409 2409
2410 def isascending(self): 2410 def isascending(self):
2411 """Returns True if the collection is ascending order, False if not. 2411 """Returns True if the collection is ascending order, False if not.
2412 2412
2413 This is part of the mandatory API for smartset.""" 2413 This is part of the mandatory API for smartset."""
2414 return False 2414 return self._ascending is not None and self._ascending
2415 2415
2416 def isdescending(self): 2416 def isdescending(self):
2417 """Returns True if the collection is descending order, False if not. 2417 """Returns True if the collection is descending order, False if not.
2418 2418
2419 This is part of the mandatory API for smartset.""" 2419 This is part of the mandatory API for smartset."""
2420 return False 2420 return self._ascending is not None and not self._ascending
2421 2421
2422 def first(self): 2422 def first(self):
2423 if self: 2423 if self:
2424 return self._list[0] 2424 return self._list[0]
2425 return None 2425 return None