changeset 20371 | 6f3fb6a974e0 |
parent 20370 | aa51392da507 |
child 20518 | 1e43f15a647f |
--- 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