# HG changeset patch # User Anton Shestakov # Date 1628373551 -10800 # Node ID 189f4775ac2b14041685d8dca9deb2f293b50dbf # Parent 056033a7689fda9ff8385f3c6f97027be31d20c3 compat: patch overlayworkingctx.markcopied() for hg 4.9 and earlier This is required for the fix for issue6416 (4a09e95d29c9) to work on older Mercurial versions. diff -r 056033a7689f -r 189f4775ac2b hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Thu Jul 29 22:45:51 2021 +0300 +++ b/hgext3rd/evolve/compat.py Sun Aug 08 00:59:11 2021 +0300 @@ -484,3 +484,12 @@ if src not in newctx or dst in newctx or ds[dst] != b'a': src = None ds.copy(src, dst) + +# hg <= 4.9 (e1ceefab9bca) +code = context.overlayworkingctx._markdirty.__code__ +if 'copied' not in code.co_varnames[:code.co_argcount]: + def fixedmarkcopied(self, path, origin): + self._markdirty(path, exists=True, date=self.filedate(path), + flags=self.flags(path), copied=origin) + + context.overlayworkingctx.markcopied = fixedmarkcopied