# HG changeset patch # User Laurent Charignon # Date 2015-05-22 20:06:45 # Node ID b7876b8fa063352e4eb835cee60d8555cbb42adb # Parent bcb17d7dbec25088eaec5e4d34dedbd7057c5d68 patch: add 'extra' argument to makememctx The uncommit command in evolve needs to create memory context with given extra parameters. This patch allows us to do that instead of always giving them an empty value and having to override it afterwards. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -340,7 +340,7 @@ class basectx(object): def makememctx(repo, parents, text, user, date, branch, files, store, - editor=None): + editor=None, extra=None): def getfilectx(repo, memctx, path): data, mode, copied = store.getfile(path) if data is None: @@ -348,7 +348,8 @@ def makememctx(repo, parents, text, user islink, isexec = mode return memfilectx(repo, path, data, islink=islink, isexec=isexec, copied=copied, memctx=memctx) - extra = {} + if extra is None: + extra = {} if branch: extra['branch'] = encoding.fromlocal(branch) ctx = memctx(repo, parents, text, files, getfilectx, user,