revset: changed sort method to use native sort implementation of smartsets
When sort is done by revision or reversed revision number it can just call
sort on the set and doesn't have to iterate it all over again.
--- a/mercurial/revset.py Thu Mar 13 17:16:58 2014 -0700
+++ b/mercurial/revset.py Thu Mar 13 17:15:21 2014 -0700
@@ -1492,7 +1492,14 @@
l = []
def invert(s):
return "".join(chr(255 - ord(c)) for c in s)
- for r in getset(repo, subset, s):
+ revs = getset(repo, subset, s)
+ if keys == ["rev"]:
+ revs.sort()
+ return revs
+ elif keys == ["-rev"]:
+ revs.sort(reverse=True)
+ return revs
+ for r in revs:
c = repo[r]
e = []
for k in keys: