changeset 22533:5b65429721d5

revset: use `subset &` in `divergent` This takes advantage of the `fullreposet` smartness. revset #0: divergent() 0) wall 0.002047 comb 0.000000 user 0.000000 sys 0.000000 (best of 813) 1) wall 0.000052 comb 0.000000 user 0.000000 sys 0.000000 (best of 22757)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 10:58:39 -0700
parents 0cf46b8298fe
children 6261b9c549a2
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Sep 17 10:57:57 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:58:39 2014 -0700
@@ -734,7 +734,7 @@
     # i18n: "divergent" is a keyword
     getargs(x, 0, 0, _("divergent takes no arguments"))
     divergent = obsmod.getrevs(repo, 'divergent')
-    return subset.filter(divergent.__contains__)
+    return subset & divergent
 
 def draft(repo, subset, x):
     """``draft()``