D5594: copies: consider nullrev a common ancestor

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Fri Jan 18 07:14:38 EST 2019


yuja added a comment.


  >   I've seen many bugs in the git codebase that were caused by it not
  >   having a null revision and being forced to treat root commits
  >   differently. Mercurial has a null revision and I think it's generally
  >   a bug to treat it differently from other commits in graph algorithms.
  
  I agree with that, but I don't think every non-merge revision (p2 = null)
  should be considered a direct child of null revision.
  
  > @@ -65,8 +63,6 @@
  > 
  >   else:
  >       parents = cl.parentrevs(r)
  
  Here `parents[1]` may be `nullrev`. Is that expected?
  
  >   for p in parents:
  > 
  > - if p < 0:
  > - continue

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5594

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list