D5594: copies: consider nullrev a common ancestor

Yuya Nishihara yuya at tcha.org
Fri Jan 18 07:12:45 EST 2019


>   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


More information about the Mercurial-devel mailing list