Mercurial > python-hglib
diff hglib/context.py @ 151:b91356bf7186
hglib: use strtobytes() (issue4520)
author | Brett Cannon <brett@python.org> |
---|---|
date | Thu, 19 Mar 2015 17:42:46 -0400 |
parents | 958307b30af3 |
children | ef8eb78fc88d |
line wrap: on
line diff
--- a/hglib/context.py Thu Mar 19 17:42:26 2015 -0400 +++ b/hglib/context.py Thu Mar 19 17:42:46 2015 -0400 @@ -1,7 +1,7 @@ import hglib.client # Circular dependency. from hglib import util, templates from hglib.error import CommandError -from hglib.util import b +from hglib.util import b, strtobytes _nullcset = [b('-1'), b('0000000000000000000000000000000000000000'), b(''), b(''), b(''), b(''), b('')] @@ -20,7 +20,7 @@ cset = _nullcset else: if isinstance(changeid, (long, int)): - changeid = b('rev(') + str(changeid).encode('latin-1') + b(')') + changeid = b('rev(') + strtobytes(changeid) + b(')') notfound = False try: