Commits

Hidetaka Iwata  committed b309d12

graph: remove needless methods/method calls of RevColorPalette

  • Participants
  • Parent commits 85636dd

Comments (0)

Files changed (1)

File tortoisehg/hgqt/graph.py

                 curr_rev -= 1
                 continue
             revs.append(curr_rev)
-            rev_color.addheadctx(ctx)
-        curcolor = rev_color[curr_rev]
         rev_index = revs.index(curr_rev)
         next_revs = revs[:]
         activeedges = [e for e in activeedges if e.endrev < curr_rev]
         self._knowncolors = {}
         self._nextcolor = 0
 
-    def addheadctx(self, ctx):
-        color = self.get(ctx)
-        p_ctxs = self._getparents(ctx)
-        self._pendingheads.append((p_ctxs, color))
-
     def _fillpendingheads(self, stoprev):
         if stoprev is None:
             return  # avoid filling everything (int_rev < None is False)
                 self._pendingheads.append((p_ctxs, color))
         return self._knowncolors[rev]
 
-    def __getitem__(self, rev):
-        self._fillpendingheads(rev)
-        return self._knowncolors[rev]
-
-    def __contains__(self, rev):
-        self._fillpendingheads(rev)
-        return rev in self._knowncolors
-
-
 class GraphEdge(tuple):
     __slots__ = ()
     def __new__(cls, startrev, endrev, color, linktype=LINE_TYPE_PARENT):