# HG changeset patch # User Pierre-Yves David # Date 1521711284 -3600 # Node ID d24ba168a53212e1d5949f88e2e0705679942020 # Parent 9868670005216ea6939d1002abcaed6bbea1642c obslog: cleanup patch handling after 4.1 compat drop We can remove some of your compatibility code. diff -r 986867000521 -r d24ba168a532 hgext3rd/evolve/obshistory.py --- a/hgext3rd/evolve/obshistory.py Thu Mar 22 10:25:01 2018 +0100 +++ b/hgext3rd/evolve/obshistory.py Thu Mar 22 10:34:44 2018 +0100 @@ -172,15 +172,11 @@ succname = "changeset-description" d = compat.strdiff(basedesc, succdesc, basename, succname) - # mercurial 4.1 and before return the patch directly - if not isinstance(d, tuple): - patch = d - else: - uheaders, hunks = d + uheaders, hunks = d - # Copied from patch.diff - text = ''.join(sum((list(hlines) for hrange, hlines in hunks), [])) - patch = "\n".join(uheaders + [text]) + # Copied from patch.diff + text = ''.join(sum((list(hlines) for hrange, hlines in hunks), [])) + patch = "\n".join(uheaders + [text]) return patch