Changeset - 2bb58ce6adbf
[Not reviewed]
default
0 2 0
Manuel Jacob - 7 years ago 2019-02-18 23:50:43
me@manueljacob.de
hg: rename `precursors` property of MercurialChangeset to `predecessors`

Mercurial changed the terminology around version 4.4.
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/changeset.py
Show inline comments
 
@@ -94,13 +94,13 @@ class MercurialChangeset(BaseChangeset):
 
            # 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 precursors(self):
 
    def predecessors(self):
 
        precursors = 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])
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -114,22 +114,22 @@ ${self.repo_context_bar('changelog', c.c
 
                           %>
 
                         <a class='successors_hash' href="${h.url('changeset_home',repo_name=c.repo_name, revision=s)}">${s}</a>${comma}
 
                       % endfor
 
                     </div>
 
                     % endif
 

	
 
                     % if hasattr(c.changeset, 'precursors') and c.changeset.precursors:
 
                     <div class='precursors'>
 
                       <span class='precursors_header'>${_('Preceded by:')} </span>
 
                       % for i, s in enumerate(c.changeset.precursors):
 
                     % if hasattr(c.changeset, 'predecessors') and c.changeset.predecessors:
 
                     <div class='predecessors'>
 
                       <span class='predecessors_header'>${_('Preceded by:')} </span>
 
                       % for i, s in enumerate(c.changeset.predecessors):
 
                           <%
 
                           comma = ""
 
                           if i != len(c.changeset.precursors)-1:
 
                           if i != len(c.changeset.predecessors)-1:
 
                             comma = ", "
 
                           %>
 
                           <a class="precursors_hash" href="${h.url('changeset_home',repo_name=c.repo_name, revision=s)}">${s}</a>${comma}
 
                           <a class="predecessors_hash" href="${h.url('changeset_home',repo_name=c.repo_name, revision=s)}">${s}</a>${comma}
 
                       % endfor
 
                     </div>
 
                     % endif
 
                </div>
 
            </div>
 
            <div class="form-group formatted-fixed">${h.urlify_text(c.changeset.message, c.repo_name)}</div>
0 comments (0 inline, 0 general)