2770 repo.dirstate.write(tr) |
2770 repo.dirstate.write(tr) |
2771 pending = tr and tr.writepending() and repo.root |
2771 pending = tr and tr.writepending() and repo.root |
2772 |
2772 |
2773 editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(), |
2773 editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(), |
2774 editform=editform, pending=pending) |
2774 editform=editform, pending=pending) |
|
2775 text = editortext |
2775 |
2776 |
2776 # strip away anything below this special string (used for editors that want |
2777 # strip away anything below this special string (used for editors that want |
2777 # to display the diff) |
2778 # to display the diff) |
2778 stripbelow = re.search(_linebelow, editortext, flags=re.MULTILINE) |
2779 stripbelow = re.search(_linebelow, text, flags=re.MULTILINE) |
2779 if stripbelow: |
2780 if stripbelow: |
2780 editortext = editortext[:stripbelow.start()] |
2781 text = text[:stripbelow.start()] |
2781 |
2782 |
2782 text = re.sub("(?m)^HG:.*(\n|$)", "", editortext) |
2783 text = re.sub("(?m)^HG:.*(\n|$)", "", text) |
2783 os.chdir(olddir) |
2784 os.chdir(olddir) |
2784 |
2785 |
2785 if finishdesc: |
2786 if finishdesc: |
2786 text = finishdesc(text) |
2787 text = finishdesc(text) |
2787 if not text.strip(): |
2788 if not text.strip(): |