diff mercurial/templater.py @ 32684:af854b1b36f8

revlog: add support for partial matching of wdir node id The idea is simple. If the given node id prefix is 'ff...f', add +1 to the number of matches (e.g. ambiguous if partial + maybewdir > 1). This patch also fixes id() revset and shortest() template since _partialmatch() can raise WdirUnsupported exception.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 19 Aug 2016 18:26:04 +0900
parents 52e222eef646
children 2ecce24dfcd3
line wrap: on
line diff
--- a/mercurial/templater.py	Sat Aug 20 18:15:19 2016 +0900
+++ b/mercurial/templater.py	Fri Aug 19 18:26:04 2016 +0900
@@ -960,6 +960,9 @@
                 return True
         except error.RevlogError:
             return False
+        except error.WdirUnsupported:
+            # single 'ff...' match
+            return True
 
     shortest = node
     startlength = max(6, minlength)