mercurial/context.py
changeset 25303 b7876b8fa063
parent 25195 472a685a4961
child 25417 95c271356a66
equal deleted inserted replaced
25302:bcb17d7dbec2 25303:b7876b8fa063
   338 
   338 
   339         return r
   339         return r
   340 
   340 
   341 
   341 
   342 def makememctx(repo, parents, text, user, date, branch, files, store,
   342 def makememctx(repo, parents, text, user, date, branch, files, store,
   343                editor=None):
   343                editor=None, extra=None):
   344     def getfilectx(repo, memctx, path):
   344     def getfilectx(repo, memctx, path):
   345         data, mode, copied = store.getfile(path)
   345         data, mode, copied = store.getfile(path)
   346         if data is None:
   346         if data is None:
   347             return None
   347             return None
   348         islink, isexec = mode
   348         islink, isexec = mode
   349         return memfilectx(repo, path, data, islink=islink, isexec=isexec,
   349         return memfilectx(repo, path, data, islink=islink, isexec=isexec,
   350                                   copied=copied, memctx=memctx)
   350                                   copied=copied, memctx=memctx)
   351     extra = {}
   351     if extra is None:
       
   352         extra = {}
   352     if branch:
   353     if branch:
   353         extra['branch'] = encoding.fromlocal(branch)
   354         extra['branch'] = encoding.fromlocal(branch)
   354     ctx =  memctx(repo, parents, text, files, getfilectx, user,
   355     ctx =  memctx(repo, parents, text, files, getfilectx, user,
   355                           date, extra, editor)
   356                           date, extra, editor)
   356     return ctx
   357     return ctx