diff -r cd43195ef876 -r 228b0aafb1ce mercurial/revset.py --- a/mercurial/revset.py Tue Oct 07 00:20:00 2014 -0700 +++ b/mercurial/revset.py Mon Oct 06 11:46:53 2014 -0700 @@ -2262,6 +2262,18 @@ raise ValueError('arg is an empty sequence') return max(self) + def first(self): + """return the first element in the set (user iteration perspective) + + Return None if the set is empty""" + raise NotImplementedError() + + def last(self): + """return the last element in the set (user iteration perspective) + + Return None if the set is empty""" + raise NotImplementedError() + def reverse(self): """reverse the expected iteration order""" raise NotImplementedError()