Patchwork [1,of,8] revset: drop spanset._contained

login
register
mail settings
Submitter Pierre-Yves David
Date May 2, 2014, 1:45 a.m.
Message ID <5aa714530dac1de26436.1398995122@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4474/
State Accepted
Commit b7f49b7652411f9c38b2f49fad9da54510d2bb67
Headers show

Comments

Pierre-Yves David - May 2, 2014, 1:45 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1398494304 25200
#      Fri Apr 25 23:38:24 2014 -0700
# Node ID 5aa714530dac1de26436a5fb2057d39e06ebdb44
# Parent  cadad384c97c7956c98f3c9b92d8cc40fa16d93b
revset: drop spanset._contained

All its users inlined it for performance reasons.
(See 1d7a2771aa36 and e2031c8ca4f8)

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2762,14 +2762,10 @@  class spanset(_orderedsetmixin):
 
     def descending(self):
         if self._start < self._end:
             self.reverse()
 
-    def _contained(self, rev):
-        return (rev <= self._start and rev > self._end) or (rev >= self._start
-                and rev < self._end)
-
     def __iter__(self):
         if self._start <= self._end:
             iterrange = xrange(self._start, self._end)
         else:
             iterrange = xrange(self._start, self._end, -1)