Changeset - 86f22a1fe48c
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-03-26 17:35:43
mads@kiilerich.com
Grafted from: 30893bd17e7b
py3: vcs should return successors and predecessors short hashes as strings
1 file changed with 4 insertions and 7 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/changeset.py
Show inline comments
 
@@ -76,16 +76,13 @@ class MercurialChangeset(BaseChangeset):
 
    @LazyProperty
 
    def successors(self):
 
        successors = mercurial.obsutil.successorssets(self._ctx._repo, self._ctx.node(), closest=True)
 
        if successors:
 
            # flatten the list here handles both divergent (len > 1)
 
            # and the usual case (len = 1)
 
            successors = [mercurial.node.hex(n)[:12] for sub in successors for n in sub if n != self._ctx.node()]
 

	
 
        return successors
 
        # flatten the list here handles both divergent (len > 1)
 
        # and the usual case (len = 1)
 
        return [safe_str(mercurial.node.hex(n)[:12]) for sub in successors for n in sub if n != self._ctx.node()]
 

	
 
    @LazyProperty
 
    def predecessors(self):
 
        return [mercurial.node.hex(n)[:12] for n in mercurial.obsutil.closestpredecessors(self._ctx._repo, self._ctx.node())]
 
        return [safe_str(mercurial.node.hex(n)[:12]) for n in mercurial.obsutil.closestpredecessors(self._ctx._repo, self._ctx.node())]
 

	
 
    @LazyProperty
 
    def bookmarks(self):
0 comments (0 inline, 0 general)