diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2444,11 +2444,9 @@ 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() + if (ui.configbool('rewrite','update-timestamp') and + not opts.get('date')): + date = dateutil.makedate() # Parse the date to allow comparison between date and old.date() date = dateutil.parsedate(date) @@ -2570,9 +2568,7 @@ # anyway because of the amend_source noise. # # This not what we expect from amend. - if (date == old.date() or - (ui.configbool('rewrite','update-timestamp') and - not opts.get('date'))): + if (date == old.date() or not opts.get('date')): return old.node() commitphase = None