comparison mercurial/revset.py @ 20752:6744f4621434

revset: add a default argument for baseset.__init__ We are now able to create empty baseset using `baseset()` as we are able to create empty list with `list()`.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 14 Mar 2014 11:41:26 -0700
parents 91a3d50f0e3a
children 13c38b1aeebe
comparison
equal deleted inserted replaced
20751:91a3d50f0e3a 20752:6744f4621434
2172 """Basic data structure that represents a revset and contains the basic 2172 """Basic data structure that represents a revset and contains the basic
2173 operation that it should be able to perform. 2173 operation that it should be able to perform.
2174 2174
2175 Every method in this class should be implemented by any smartset class. 2175 Every method in this class should be implemented by any smartset class.
2176 """ 2176 """
2177 def __init__(self, data): 2177 def __init__(self, data=()):
2178 super(baseset, self).__init__(data) 2178 super(baseset, self).__init__(data)
2179 self._set = None 2179 self._set = None
2180 2180
2181 def ascending(self): 2181 def ascending(self):
2182 """Sorts the set in ascending order (in place). 2182 """Sorts the set in ascending order (in place).