mercurial/cmdutil.py
changeset 34029 6e6452bc441d
parent 34022 d5b2beca16c0
child 34055 ae92e5c0441c
equal deleted inserted replaced
34028:bfb38c5cebf4 34029:6e6452bc441d
   339             if opts.get('review', False):
   339             if opts.get('review', False):
   340                 patchtext = (crecordmod.diffhelptext
   340                 patchtext = (crecordmod.diffhelptext
   341                              + crecordmod.patchhelptext
   341                              + crecordmod.patchhelptext
   342                              + fp.read())
   342                              + fp.read())
   343                 reviewedpatch = ui.edit(patchtext, "",
   343                 reviewedpatch = ui.edit(patchtext, "",
   344                                         extra={"suffix": ".diff"},
   344                                         action="diff",
   345                                         repopath=repo.path)
   345                                         repopath=repo.path)
   346                 fp.truncate(0)
   346                 fp.truncate(0)
   347                 fp.write(reviewedpatch)
   347                 fp.write(reviewedpatch)
   348                 fp.seek(0)
   348                 fp.seek(0)
   349 
   349 
  3215     repo.dirstate.write(tr)
  3215     repo.dirstate.write(tr)
  3216     pending = tr and tr.writepending() and repo.root
  3216     pending = tr and tr.writepending() and repo.root
  3217 
  3217 
  3218     editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(),
  3218     editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(),
  3219                               editform=editform, pending=pending,
  3219                               editform=editform, pending=pending,
  3220                               repopath=repo.path)
  3220                               repopath=repo.path, action='commit')
  3221     text = editortext
  3221     text = editortext
  3222 
  3222 
  3223     # strip away anything below this special string (used for editors that want
  3223     # strip away anything below this special string (used for editors that want
  3224     # to display the diff)
  3224     # to display the diff)
  3225     stripbelow = re.search(_linebelow, text, flags=re.MULTILINE)
  3225     stripbelow = re.search(_linebelow, text, flags=re.MULTILINE)