Submitter | phabricator |
---|---|
Date | May 6, 2018, 4:53 a.m. |
Message ID | <differential-rev-PHID-DREV-3zarbgrzxdvt6m3wxvoq-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/31289/ |
State | Superseded |
Headers | show |
Comments
"I don't know what the reason for the 4-digit limit was," I guessed it would avoid building a full radix tree where a given hash was likely to be ambiguous, but maybe I'm wrong since it seems clear that linear scan in Python wouldn't be faster than building radix tree in C.
yuja added a comment. "I don't know what the reason for the 4-digit limit was," I guessed it would avoid building a full radix tree where a given hash was likely to be ambiguous, but maybe I'm wrong since it seems clear that linear scan in Python wouldn't be faster than building radix tree in C. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3453 To: martinvonz, #hg-reviewers Cc: yuja, 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; }