Mercurial > evolve
changeset 5994:189f4775ac2b stable
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.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 08 Aug 2021 00:59:11 +0300 |
parents | 056033a7689f |
children | d4cdba7077db |
files | hgext3rd/evolve/compat.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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