# HG changeset patch # User Pierre-Yves David # Date 1488288244 -3600 # Node ID 2b80c01b3f58d4cc07115c92caf33d25f9d1f1fa # Parent 15ec53d46f440aed614c624f8a003dce6c4e8fa8 compat: drop compatibility layer around memctx The version we support all have the same API now. diff -r 15ec53d46f44 -r 2b80c01b3f58 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Tue Feb 28 14:22:25 2017 +0100 +++ b/hgext3rd/evolve/__init__.py Tue Feb 28 14:24:04 2017 +0100 @@ -135,16 +135,6 @@ _pack = struct.pack _unpack = struct.unpack -if gboptsmap is not None: - memfilectx = context.memfilectx -elif gboptslist is not None: - oldmemfilectx = context.memfilectx - def memfilectx(repo, *args, **kwargs): - return oldmemfilectx(*args, **kwargs) -else: - raise ImportError('evolve needs version %s or above' % - min(testedwith.split())) - aliases, entry = cmdutil.findcmd('commit', commands.table) hasinteractivemode = any(['interactive' in e for e in entry[1]]) if hasinteractivemode: @@ -880,10 +870,10 @@ if path in headmf: fctx = head[path] flags = fctx.flags() - mctx = memfilectx(repo, fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = context.memfilectx(repo, fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx return None @@ -2036,10 +2026,10 @@ if path in bumped: fctx = bumped[path] flags = fctx.flags() - mctx = memfilectx(repo, fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = context.memfilectx(repo, fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx return None text = 'bumped update to %s:\n\n' % prec @@ -2708,10 +2698,10 @@ return None fctx = contentctx[path] flags = fctx.flags() - mctx = memfilectx(repo, fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = context.memfilectx(repo, fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx new = context.memctx(repo,