yuja added a comment.

  Queued up to this patch, thanks.
  
  > +    revset = repo.ui.config('experimental', 'revisions.disambiguatewithin')
  >  +    if revset:
  >  +        revs = repo.anyrevs([revset], user=True)
  >  +        if cl.rev(node) in revs:
  >  +            hexnode = hex(node)
  >  +            for length in range(minlength, len(hexnode) + 1):
  >  +                matches = []
  >  +                prefix = hexnode[:length]
  >  +                for rev in revs:
  >  +                    otherhexnode = repo[rev].hex()
  >  +                    if prefix == otherhexnode[:length]:
  
  For micro optimization, this could be `hex(cl.node(rev)).startswith(prefix)`.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to