diff -r aa51392da507 -r 6f3fb6a974e0 mercurial/templater.py --- a/mercurial/templater.py Fri Jan 17 00:16:48 2014 -0800 +++ b/mercurial/templater.py Wed Feb 05 20:22:28 2014 -0800 @@ -368,7 +368,14 @@ cl = mapping['ctx']._repo.changelog def isvalid(test): try: - cl.index.partialmatch(test) + try: + cl.index.partialmatch(test) + except AttributeError: + # Pure mercurial doesn't support partialmatch on the index. + # Fallback to the slow way. + if cl._partialmatch(test) is None: + return False + try: int(test) return False