Changeset - 72bda0df1c20
[Not reviewed]
default
0 1 0
Manuel Jacob - 7 years ago 2019-02-18 23:41:53
me@manueljacob.de
hg: rename `precursors` variable to `predecessors`

This makes it consistent with the method name.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/changeset.py
Show inline comments
 
@@ -89,31 +89,31 @@ class MercurialChangeset(BaseChangeset):
 
    @LazyProperty
 
    def successors(self):
 
        successors = obsolete.successorssets(self._ctx._repo, self._ctx.node())
 
        if successors:
 
            # flatten the list here handles both divergent (len > 1)
 
            # and the usual case (len = 1)
 
            successors = [hex(n)[:12] for sub in successors for n in sub if n != self._ctx.node()]
 

	
 
        return successors
 

	
 
    @LazyProperty
 
    def predecessors(self):
 
        precursors = set()
 
        predecessors = set()
 
        nm = self._ctx._repo.changelog.nodemap
 
        for p in self._ctx._repo.obsstore.precursors.get(self._ctx.node(), ()):
 
            pr = nm.get(p[0])
 
            if pr is not None:
 
                precursors.add(hex(p[0])[:12])
 
        return precursors
 
                predecessors.add(hex(p[0])[:12])
 
        return predecessors
 

	
 
    @LazyProperty
 
    def bookmarks(self):
 
        return map(safe_unicode, self._ctx.bookmarks())
 

	
 
    @LazyProperty
 
    def message(self):
 
        return safe_unicode(self._ctx.description())
 

	
 
    @LazyProperty
 
    def committer(self):
 
        return safe_unicode(self.author)
0 comments (0 inline, 0 general)