diff -r efcaf6ab86f4 -r e37fd5be0fed mercurial/templatefilters.py --- a/mercurial/templatefilters.py Wed May 03 09:41:55 2017 -0400 +++ b/mercurial/templatefilters.py Thu Apr 20 19:51:37 2017 +0530 @@ -16,6 +16,7 @@ encoding, hbisect, node, + pycompat, registrar, templatekw, util, @@ -24,6 +25,9 @@ urlerr = util.urlerr urlreq = util.urlreq +if pycompat.ispy3: + long = int + # filters are callables like: # fn(obj) # with: