Mercurial > hgsubversion
changeset 1573:bb09e8a230d6 1.9.2
wrappers: fix old versions of hg without breaking 4.6
Whoops.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 28 May 2018 13:37:15 -0400 |
parents | 51e105c7f0c6 |
children | c6cef4741ef5 |
files | hgsubversion/wrappers.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -184,7 +184,9 @@ def diff(orig, ui, repo, *args, **opts): parent = repo[o_r[-1]].parents()[0] opts['rev'] = ['%s:.' % node.hex(parent.node()), ] node1, node2 = scmutil.revpair(repo, opts['rev']) - node1, node2 = node1.node(), node2.node() + if not isinstance(node1, bytes): + # hg 4.6 and later return contexts, so convert to bytestr + node1, node2 = node1.node(), node2.node() baserev, _junk = hashes.get(node1, (-1, 'junk')) newrev, _junk = hashes.get(node2, (-1, 'junk')) it = patch.diff(repo, node1, node2,