obslog: cleanup patch handling after 4.1 compat drop
We can remove some of your compatibility code.
--- 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