Commits

Augie Fackler committed fb07da0 Merge

Merge.

  • Participants
  • Parent commits 33ad34f, cf6f5f6

Comments (0)

Files changed (1)

File 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