hgext3rd/topic/stack.py
branchstable
changeset 4828 aaf8742e09a0
parent 4759 f30c1fab7155
child 4829 6b82b4f72347
equal deleted inserted replaced
4826:efc76b1563f0 4828:aaf8742e09a0
    86     def index(self, item):
    86     def index(self, item):
    87         return self.revs.index(item)
    87         return self.revs.index(item)
    88 
    88 
    89     @util.propertycache
    89     @util.propertycache
    90     def _dependencies(self):
    90     def _dependencies(self):
       
    91         return self.builddependencies()
       
    92 
       
    93     def builddependencies(self):
    91         deps, rdeps = builddependencies(self._repo, self._revs)
    94         deps, rdeps = builddependencies(self._repo, self._revs)
    92 
    95 
    93         repo = self._repo
    96         repo = self._repo
    94         srcpfunc = repo.changelog.parentrevs
    97         srcpfunc = repo.changelog.parentrevs
    95 
    98 
   141     def revs(self):
   144     def revs(self):
   142         # some duplication/change from _orderrevs because we use a post
   145         # some duplication/change from _orderrevs because we use a post
   143         # processed dependency graph.
   146         # processed dependency graph.
   144 
   147 
   145         # Step 1: compute relation of revision with each other
   148         # Step 1: compute relation of revision with each other
   146         dependencies, rdependencies = self._dependencies
   149         dependencies, rdependencies = self.builddependencies()
   147         dependencies = dependencies.copy()
   150         dependencies = dependencies.copy()
   148         rdependencies = rdependencies.copy()
   151         rdependencies = rdependencies.copy()
   149         # Step 2: Build the ordering
   152         # Step 2: Build the ordering
   150         # Remove the revisions with no dependency(A) and add them to the ordering.
   153         # Remove the revisions with no dependency(A) and add them to the ordering.
   151         # Removing these revisions leads to new revisions with no dependency (the
   154         # Removing these revisions leads to new revisions with no dependency (the