changeset 13938:e44ebd2a142a

revset: optimize stringset when subset == entire repo if range(len(repo)) is passed to stringset and x is a valid rev (checked before) then x is guaranteed to be in subset, we can check for that by comparing the lengths of the sets
author Idan Kamara <idankk86@gmail.com>
date Fri, 15 Apr 2011 20:07:44 +0300
parents f4e4faa92939
children ed22a26fc7c6
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -123,7 +123,7 @@
     x = repo[x].rev()
     if x == -1 and len(subset) == len(repo):
         return [-1]
-    if x in subset:
+    if len(subset) == len(repo) or x in subset:
         return [x]
     return []