diff -r 685cf59a134f -r 79f8f032c706 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Jan 06 15:25:10 2019 -0500 +++ b/mercurial/cmdutil.py Fri Jan 04 20:27:17 2019 +0530 @@ -2443,6 +2443,12 @@ user = opts.get('user') or old.user() date = opts.get('date') or old.date() + if ui.configbool('rewrite', 'update-timestamp'): + if opts.get('date'): + pass + else: + date = dateutil.makedate() + # Parse the date to allow comparison between date and old.date() date = dateutil.parsedate(date) @@ -2558,13 +2564,15 @@ if ((not changes) and newdesc == old.description() and user == old.user() - and date == old.date() and pureextra == old.extra()): # nothing changed. continuing here would create a new node # anyway because of the amend_source noise. # # This not what we expect from amend. - return old.node() + if (date == old.date() or + (ui.configbool('rewrite', 'update-timestamp') and + not opts.get('date'))): + return old.node() commitphase = None if opts.get('secret'):