mercurial/cmdutil.py
branchstable
changeset 23101 b564330d4b1f
parent 22951 6c86c673dde6
child 23139 e53f6b72a0e4
child 23403 edf29f9c15f0
--- a/mercurial/cmdutil.py	Tue Oct 28 14:06:06 2014 -0700
+++ b/mercurial/cmdutil.py	Tue Oct 28 23:05:19 2014 -0400
@@ -2121,6 +2121,11 @@
                       scmutil.match(repo[None], pats, opts), opts)
 
 def amend(ui, repo, commitfunc, old, extra, pats, opts):
+    # amend will reuse the existing user if not specified, but the obsolete
+    # marker creation requires that the current user's name is specified.
+    if obsolete._enabled:
+        ui.username() # raise exception if username not set
+
     ui.note(_('amending changeset %s\n') % old)
     base = old.p1()