D5945: rust: itering less on MissingAncestors.bases for max()

gracinet (Georges Racinet) phabricator at mercurial-scm.org
Tue Feb 12 16:32:23 UTC 2019


gracinet added inline comments.

INLINE COMMENTS

> kevincox wrote in ancestors.rs:41
> Does it make sense to just default this to -1 and remove the option?

I must confess to have hesitated a bit on that one. On one hand, it would work, but semantically if ever a new "special" revision -2 is introduced, this could become problematic. On the other hand, there are probably a few areas that already depend on the fact that NULL_REVISION is the smallest one.

From the graph side of things, NULL_REVISION being a common ancestor of all revisions, so it must be smaller or equal than all, so it doesn't matter much.

Option<Revision> was merely a simple way to be sure not to be wrong, I'm open to suggestions.

REPOSITORY
  rHG Mercurial

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

To: gracinet, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list