# HG changeset patch # User Brett Cannon # Date 1427328954 14400 # Node ID 11202c85737eef4677aa68f950ec985a5491c2ee # Parent ef8eb78fc88df516d835d4ab532807aee4d0e82f hglib: make sure hgclient.diff() works with bytes (issue4520) diff -r ef8eb78fc88d -r 11202c85737e hglib/client.py --- 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,