# HG changeset patch # User Pierre-Yves David # Date 1401783751 25200 # Node ID ef155e3ead8fb354003ca8d33389f6cd78481d45 # Parent a02e5916a7e3db20c5d5770c84f7d86ab624b8a5 evolve: abstract access to context.memfilectx This class is getting altered in the future Mercurial 3.1.0. This changeset prepare a compatibility layer. diff -r a02e5916a7e3 -r ef155e3ead8f hgext/evolve.py --- a/hgext/evolve.py Mon Jun 02 14:18:29 2014 -0700 +++ b/hgext/evolve.py Tue Jun 03 01:22:31 2014 -0700 @@ -73,6 +73,7 @@ _pack = struct.pack +memfilectx = context.memfilectx # This extension contains the following code # @@ -755,10 +756,10 @@ if path in headmf: fctx = head[path] flags = fctx.flags() - mctx = context.memfilectx(fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = memfilectx(fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx raise IOError() @@ -1405,10 +1406,10 @@ if path in bumped: fctx = bumped[path] flags = fctx.flags() - mctx = context.memfilectx(fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = memfilectx(fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx raise IOError() text = 'bumped update to %s:\n\n' % prec @@ -1835,10 +1836,10 @@ raise IOError() fctx = ctx[path] flags = fctx.flags() - mctx = context.memfilectx(fctx.path(), fctx.data(), - islink='l' in flags, - isexec='x' in flags, - copied=copied.get(path)) + mctx = memfilectx(fctx.path(), fctx.data(), + islink='l' in flags, + isexec='x' in flags, + copied=copied.get(path)) return mctx new = context.memctx(repo,