mq: use `revs.sort()` to ensure the set is ascending
Sorting is super-cheap with the new smartset class, so we can use it to enforce
the order. Otherwise all smartset classes would have to allow direct indexing.
--- a/hgext/mq.py Mon Oct 06 10:41:43 2014 -0700
+++ b/hgext/mq.py Tue Oct 07 00:12:56 2014 -0700
@@ -1002,8 +1002,7 @@
if not self.applied:
raise util.Abort(_('no patches applied'))
revs = scmutil.revrange(repo, opts.get('rev'))
- if len(revs) > 1 and revs[0] > revs[1]:
- revs.reverse()
+ revs.sort()
revpatches = self._revpatches(repo, revs)
realpatches += revpatches
numrevs = len(revpatches)