Commits

Yuya Nishihara committed 5dbe091

fin

Comments (0)

Files changed (2)

+deq.diff
+pop.diff
+unfly-nvds.diff
 fv-chunkmsplit.diff
 fv-chunkmarkupdatable.diff
 fv-preservechunksel.diff
 graphdele-paintdirect.diff
 graphdele-shadow-exp.diff
 graphdele-overpaint-exp.diff
-deq.diff
-pop.diff
-unfly-nvds.diff
-unfly-ignorednvds.diff
 p4-debug.diff #+debug
 commit-msgtrace2.diff #+debug
 backdoor.diff

unfly-ignorednvds.diff

-# HG changeset patch
-# Parent 954efd171c8a275383ec38a3fb4cb3aca0a99bd8
-
-diff --git a/tortoisehg/hgqt/graph.py b/tortoisehg/hgqt/graph.py
---- a/tortoisehg/hgqt/graph.py
-+++ b/tortoisehg/hgqt/graph.py
-@@ -240,8 +240,6 @@ LINE_TYPE_GRAFT = 1
- LINE_TYPE_OBSOLETE = 2
- LINE_TYPE_FAMILY = 3
- 
--_emptyset = frozenset([])
--
- class StandardDag(object):
-     """Generate DAG for grapher
- 
-@@ -369,15 +367,14 @@ class _FamilyLineRev(object):
-         self.rev = rev
-         self.visible = visible
-         self.nvds = {}
--        self.ignored_nvds = _emptyset
-+        self.ignored_nvds = set()
-         self.pending = 0
-         self.nvas = []
- 
-     def proceed(self, parents):
-         nvds, ignored_nvds = self.nvds, self.ignored_nvds
--        garbages = [r for r in ignored_nvds if not r.pending]
--        if garbages:
--            ignored_nvds = ignored_nvds.difference(garbages)
-+        ignored_nvds.difference_update([r for r in ignored_nvds
-+                                        if not r.pending])
-         
-         # decrement `pending` of each nvds regardless of self.visible once.
-         # (will be re-incremented if self is hidden and self has parents)
-@@ -385,9 +382,9 @@ class _FamilyLineRev(object):
-             r.pending -= 1
-             assert r.pending >= 0
- 
--        if ignored_nvds:
--            nvds = dict(kv for kv in nvds.items()
--                         if kv[0] not in ignored_nvds)
-+        for k in ignored_nvds:
-+            if k in nvds:
-+                del nvds[k]
- 
-         if self.visible:
-             for nvd, is_p1 in nvds.iteritems():
-@@ -400,7 +397,7 @@ class _FamilyLineRev(object):
-                 p.ignore_nvds(ignored_of_parent)
-                 if p.visible:
-                     self.nvas.append((p.rev, LINE_TYPE_PARENT, i == 0))
--                    p.ignore_nvds(frozenset([self]))
-+                    p.ignore_nvds([self])
-                 else:
-                     p.add_nvds({self:i == 0})
-         else:
-@@ -420,14 +417,7 @@ class _FamilyLineRev(object):
-                 self.nvds[r] = is_p1
- 
-     def ignore_nvds(self, nvds):
--        if not nvds:
--            return
--        if not self.ignored_nvds:
--            self.ignored_nvds = nvds
--        else:
--            new_nvds = nvds - self.ignored_nvds
--            if new_nvds:
--                self.ignored_nvds |= new_nvds
-+        self.ignored_nvds.update(nvds)
- 
-     def __hash__(self):
-         return hash(self.rev)