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

gracinet (Georges Racinet) phabricator at mercurial-scm.org
Wed Feb 13 05:18:21 EST 2019


gracinet added inline comments.

INLINE COMMENTS

> kevincox wrote in ancestors.rs:41
> If you don't want to depend on the value of NULL_REVISION you can use the minimum value for the type backing revision.
> 
> Other special revisions shouldn't be relevant because you shouldn't be comparing them as the max anyways.
> 
> That being said the currents state is fine. So if you think it makes more sense that sounds good to me.

Ok, I've made up my mind: whatever the representation, `NULL_REVISION` must be smaller than all other `Revision`. Using it, rather than `-1`will indeed make this patch simpler.

Also, in subsequent (not yet submitted) works, I'm already liberally using this fact that `NULL_REVISION` is the smallest of all, so…

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