Commits

Yuya Nishihara committed 9e14b9e

purge

Comments (0)

Files changed (4)

deq.diff

-# HG changeset patch
-# Parent ce8a220e7aef3390344fec1523154e203142292e
-
-diff --git a/tortoisehg/hgqt/graph.py b/tortoisehg/hgqt/graph.py
---- a/tortoisehg/hgqt/graph.py
-+++ b/tortoisehg/hgqt/graph.py
-@@ -226,6 +226,7 @@ Given such cases, we can define `Next vi
-     5. Rev.X is *NOT* ancestor of any other NVAs of rev.N
- """
- 
-+import collections
- import time
- import os
- import itertools
-@@ -363,7 +364,7 @@ class _FamilyLineRev(object):
-                 It will become 0 when all NVAs of self are determined.
-     """
-     __slots__ = ["rev", "visible", "nvds", "ignored_nvds", "pending", 
--                 "nvas", "_next"]
-+                 "nvas"]
-     
-     def __init__(self, rev, visible):
-         self.rev = rev
-@@ -372,7 +373,6 @@ class _FamilyLineRev(object):
-         self.ignored_nvds = _emptyset
-         self.pending = 0
-         self.nvas = []
--        self._next = None       # Behave as simple queue
- 
-     def proceed(self, parents):
-         nvds, ignored_nvds = self.nvds, self.ignored_nvds
-@@ -474,7 +474,7 @@ class FamilyLineDag(StandardDag):
-                     _FamilyLineRev(rev, visiblerev(rev) and visiblectx(ctx))
-             return ret
- 
--        qhead, qtail = None, None
-+        q = collections.deque()
-         for curr_rev, ctx in self._iter_revs(repo, lambda rev:True):
-             rev = upcomingrevs.get(curr_rev)
-             if not rev:
-@@ -490,21 +490,17 @@ class FamilyLineDag(StandardDag):
-             if not rev.visible:
-                 continue
-             # yield after rev.pending becomes 0
--            if qhead is None:
--                qhead = qtail = rev
--            else:
--                qtail._next = rev
--                qtail = rev
--            while qhead and not qhead.pending:
-+            q.append(rev)
-+            while q and not q[0].pending:
-+                qhead = q.popleft()
-                 nvas = sorted(qhead.nvas, key=lambda nva:(not nva[2], nva[0]))
-                 parents = [(repo[nva[0]], nva[1], nva[2]) for nva in nvas]
-                 hctx = repo[qhead.rev]
-                 if showgraftsource:
-                     self._append_graft_source(qhead.rev, hctx, parents)
-                 yield (qhead.rev, hctx, parents)
--                qhead = qhead._next
- 
--        assert not qhead
-+        assert not q
- 
- 
- def get_dagwalker(repo, opts):

pop.diff

-# HG changeset patch
-# Parent 75bceeadf3eb41d9032bdeb03be4ce9ea048ac02
-diff --git a/tortoisehg/hgqt/graph.py b/tortoisehg/hgqt/graph.py
---- a/tortoisehg/hgqt/graph.py
-+++ b/tortoisehg/hgqt/graph.py
-@@ -476,13 +476,11 @@ class FamilyLineDag(StandardDag):
- 
-         q = collections.deque()
-         for curr_rev, ctx in self._iter_revs(repo, lambda rev:True):
--            rev = upcomingrevs.get(curr_rev)
-+            rev = upcomingrevs.pop(curr_rev, None)
-             if not rev:
-                 if not visiblerev(curr_rev) or not visiblectx(ctx):
-                     continue
-                 rev = _FamilyLineRev(curr_rev, True)
--            else:
--                del(upcomingrevs[curr_rev])
- 
-             parents = [get_or_create_rev(p) for p in ctx.parents()
-                        if p.rev() >= stop_rev]
-deq.diff
-pop.diff
-unfly-nvds.diff
 fv-chunkmsplit.diff
 fv-chunkmarkupdatable.diff
 fv-preservechunksel.diff

unfly-nvds.diff

-# HG changeset patch
-# Parent 20b48d4ce79749bcca1a424bf7d9b6cfa7ddc811
-diff --git a/tortoisehg/hgqt/graph.py b/tortoisehg/hgqt/graph.py
---- a/tortoisehg/hgqt/graph.py
-+++ b/tortoisehg/hgqt/graph.py
-@@ -240,7 +240,6 @@ LINE_TYPE_GRAFT = 1
- LINE_TYPE_OBSOLETE = 2
- LINE_TYPE_FAMILY = 3
- 
--_emptydict = {}
- _emptyset = frozenset([])
- 
- class StandardDag(object):
-@@ -369,7 +368,7 @@ class _FamilyLineRev(object):
-     def __init__(self, rev, visible):
-         self.rev = rev
-         self.visible = visible
--        self.nvds = _emptydict
-+        self.nvds = {}
-         self.ignored_nvds = _emptyset
-         self.pending = 0
-         self.nvas = []
-@@ -413,23 +412,12 @@ class _FamilyLineRev(object):
-         self.nvds = self.ignored_nvds = None # No longer needed
- 
-     def add_nvds(self, nvds):
--        if not nvds:
--            return
--        if not self.nvds:
--            self.nvds = nvds
--            for r in nvds:
-+        for r, is_p1 in nvds.iteritems():
-+            if r in self.nvds:
-+                self.nvds[r] |= is_p1
-+            else:
-                 r.pending += 1
--        else:
--            # don't change self.nvds directly
--            # because it can be shared with other _FamilyLineRev.
--            new_nvds = self.nvds.copy()
--            for r, is_p1 in nvds.iteritems():
--                if r in new_nvds:
--                    new_nvds[r] |= is_p1
--                else:
--                    r.pending += 1
--                    new_nvds[r] = is_p1
--            self.nvds = new_nvds
-+                self.nvds[r] = is_p1
- 
-     def ignore_nvds(self, nvds):
-         if not nvds: