martinvonz added a comment.
In https://phab.mercurial-scm.org/D3852#60160, @yuja wrote: > Makes sense. One nit. > > > + if not singlenode: > > + def singlenode(repo, name): > > + n = self.namemap(repo, name) > > + if n: > > + # return max revision number > > + if len(n) > 1: > > + cl = repo.changelog > > + maxrev = max(cl.rev(node) for node in n) > > + return cl.node(maxrev) > > + return n[0] > > + return None > > + self.singlenode = singlenode > > The default implementation has to be defined as an unbound method to avoid > reference cycle: self.singlenode -> singlenode -> self. Done REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3852 To: martinvonz, #hg-reviewers Cc: yuja, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel