Commits

immerrr  committed 5136979

qcrefresh: reuse topmost applied patch message when editing commit message in chunk selector

  • Participants
  • Parent commits 75eff35

Comments (0)

Files changed (1)

File crecord/__init__.py

     clearopts = { 'exclude': ["re:."], 'message': "" }
 
     mq.refresh(ui, repo, **clearopts)
+
+    # if message wasn't specified in commandline, initialize from existing patch header
+    if not opts.get('message',''):
+        patchname = repo.mq.applied[-1].name
+        patchmsg_lines = mq.patchheader(repo.mq.join(patchname), repo.mq.plainmode).message
+        opts['message'] = '\n'.join(patchmsg_lines)
+
     dorecord(ui, repo, refreshmq, *pats, **opts)