Source

histedit / hg_histedit.py

Diff from to

hg_histedit.py

         [ctx.description(), ] +
         [repo[r].description() for r in internalchanges] +
         [oldctx.description(), ])
-    newmessage = ui.edit(newmessage, ui.username())
-    n = repo.commit(text=newmessage, user=ui.username(), date=max(ctx.date(), oldctx.date()),
+    # If the changesets are from the same author, keep it.
+    if ctx.user() == oldctx.user():
+        username = ctx.user()
+    else:
+        username = ui.username()
+    newmessage = ui.edit(newmessage, username)
+    n = repo.commit(text=newmessage, user=username, date=max(ctx.date(), oldctx.date()),
                     extra=oldctx.extra())
     return repo[n], [n, ], [oldctx.node(), ctx.node() ], [newnode, ] # xxx