changeset 22810 | 7f97cb12782f |
parent 22809 | 88dad916c008 |
child 22811 | c1fd827e1ae0 |
--- a/mercurial/revset.py Mon Oct 06 11:54:53 2014 -0700 +++ b/mercurial/revset.py Mon Oct 06 11:57:59 2014 -0700 @@ -2618,6 +2618,16 @@ if self._ascending is not None: self._ascending = not self._ascending + def first(self): + if self: + return self._list.first() + return None + + def last(self): + if self: + return self._list.last() + return None + class generatorset(abstractsmartset): """Wrap a generator for lazy iteration