On Fri, 12 May 2017 08:33:39 -0700, Jun Wu wrote: > Excerpts from Yuya Nishihara's message of 2017-05-12 22:37:10 +0900: > > > + metamatched = (crev == copy[1]) > > > > I might be wrong, but don't we need to test the equality of cfname? > > cfname is assigned from copy[0], which is assigned from fctx.renamed(). > So they are always equal. I'll add a comment.
Right. > > > + if node in getattr(flog, 'nodemap', ()): > > > + self.ui.debug('reusing %s filelog node (exact match)\n' > > > % fname) > > > + return node > > > > What would happen if flog.nodemap is somehow missing but the exact node > > exist > > in the filelog? > > nodemap should be complete as seen from callers. parsers.c makes it > incomplete and lazy but that's an implementation detail. > nodemap to test node existence is common in the code base. I meant "if flog had no nodemap attribute." In other words, why can't we do "if node in flog.nodemap" ? _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel