Patchwork D3453: revlog: use radix tree also for matching keys shorter than 4 hex digits

login
register
mail settings
Submitter phabricator
Date May 7, 2018, 12:54 p.m.
Message ID <92791e95babfca2b6507444bc43af271@localhost.localdomain>
Download mbox | patch
Permalink /patch/31296/
State Not Applicable
Headers show

Comments

phabricator - May 7, 2018, 12:54 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG92ed344a9e64: revlog: use radix tree also for matching keys shorter than 4 hex digits (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3453?vs=8470&id=8479

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

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1251,7 +1251,7 @@ 
 	if (!PyArg_ParseTuple(args, PY23("s#", "y#"), &node, &nodelen))
 		return NULL;
 
-	if (nodelen < 4) {
+	if (nodelen < 1) {
 		PyErr_SetString(PyExc_ValueError, "key too short");
 		return NULL;
 	}