diff mercurial/node.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 bd872f64a8ba
children f574cc00831a
line wrap: on
line diff
--- a/mercurial/node.py	Sat Aug 20 18:15:19 2016 +0900
+++ b/mercurial/node.py	Fri Aug 19 18:26:04 2016 +0900
@@ -29,6 +29,7 @@
 # (they are experimental, so don't add too many dependencies on them)
 wdirrev = 0x7fffffff
 wdirid = b"\xff" * 20
+wdirhex = hex(wdirid)
 
 def short(node):
     return hex(node[:6])