diff -r 96fa9dd1db38 -r 8f79aabd96f6 mercurial/parsers.c --- a/mercurial/parsers.c Tue May 08 14:48:39 2012 -0700 +++ b/mercurial/parsers.c Tue May 08 14:48:44 2012 -0700 @@ -544,6 +544,13 @@ return v & 0xf; } +/* + * Return values: + * + * -4: match is ambiguous (multiple candidates) + * -2: not found + * rest: valid rev + */ static int nt_find(indexObject *self, const char *node, Py_ssize_t nodelen) { int level, off; @@ -572,7 +579,8 @@ return -2; off = v; } - return -2; + /* multiple matches against an ambiguous prefix */ + return -4; } static int nt_new(indexObject *self)