changeset 154:11202c85737e

hglib: make sure hgclient.diff() works with bytes (issue4520)
author Brett Cannon <brett@python.org>
date Wed, 25 Mar 2015 20:15:54 -0400
parents ef8eb78fc88d
children 6ec4075191ce
files hglib/client.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hglib/client.py	Fri Mar 20 16:34:42 2015 -0400
+++ b/hglib/client.py	Wed Mar 25 20:15:54 2015 -0400
@@ -2,7 +2,7 @@
 import hglib
 from hglib import error, util, templates, merge, context
 
-from hglib.util import b, cmdbuilder, BytesIO
+from hglib.util import b, cmdbuilder, BytesIO, strtobytes
 
 class revision(tuple):
     def __new__(cls, rev, node, tags, branch, author, desc, date):
@@ -668,7 +668,7 @@
         if change and revs:
             raise ValueError('cannot specify both change and rev')
 
-        args = cmdbuilder(b('diff'), r=revs, c=change,
+        args = cmdbuilder(b('diff'), r=list(map(strtobytes, revs)), c=change,
                           a=text, g=git, nodates=nodates,
                           p=showfunction, reverse=reverse,
                           w=ignoreallspace, b=ignorespacechange,