histedit: add trailing newline when editing commit messages stable
authorMads Kiilerich <mads@kiilerich.com>
Mon, 30 Jul 2012 03:53:38 +0200
branchstable
changeset 17285 0f6f10d5f7a6
parent 17284 f3a7f05f474a
child 17286 77ce6473d644
histedit: add trailing newline when editing commit messages test-histedit-edit.t failed because Solaris sed strips lines not ending with \n.
hgext/histedit.py
--- a/hgext/histedit.py	Mon Jul 30 02:38:32 2012 +0200
+++ b/hgext/histedit.py	Mon Jul 30 03:53:38 2012 +0200
@@ -346,7 +346,7 @@
     except Exception:
         raise util.Abort(_('Fix up the change and run '
                            'hg histedit --continue'))
-    message = oldctx.description()
+    message = oldctx.description() + '\n'
     message = ui.edit(message, ui.username())
     new = repo.commit(text=message, user=oldctx.user(), date=oldctx.date(),
                       extra=oldctx.extra())
@@ -450,7 +450,7 @@
 
         m, a, r, d = repo.status()[:4]
         oldctx = repo[currentnode]
-        message = oldctx.description()
+        message = oldctx.description() + '\n'
         if action in ('e', 'edit', 'm', 'mess'):
             message = ui.edit(message, ui.username())
         elif action in ('f', 'fold'):