D5181: shortest: never emit 0-length prefix even if unique

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Oct 22 14:55:17 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbf249bb60087: shortest: never emit 0-length prefix even if unique (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5181?vs=12309&id=12310

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -495,6 +495,8 @@
     # which would be unacceptably slow. so we look for hash collision in
     # unfiltered space, which means some hashes may be slightly longer.
 
+    minlength=max(minlength, 1)
+
     def disambiguate(prefix):
         """Disambiguate against revnums."""
         if repo.ui.configbool('experimental', 'revisions.prefixhexnode'):



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


More information about the Mercurial-devel mailing list