comparison mercurial/cmdutil.py @ 41173:4145fd3569c3

amend: turn currentdate into tri-state bool so config option can be negated Otherwise, rewrite.update-timestap couldn't be overridden by --no-currentdate. FWIW, which do we like? --no-currentdate vs --no-current-date. If the latter is preferred, maybe we can add "graft --current-date" and deprecate "--currentdate".
author Yuya Nishihara <yuya@tcha.org>
date Thu, 10 Jan 2019 21:32:37 +0900
parents 126101284e04
children 6acbe86c6490
comparison
equal deleted inserted replaced
41172:3dcc96582627 41173:4145fd3569c3
2448 'exclusive')) 2448 'exclusive'))
2449 if opts.get('date'): 2449 if opts.get('date'):
2450 date = dateutil.parsedate(opts.get('date')) 2450 date = dateutil.parsedate(opts.get('date'))
2451 elif opts.get('currentdate'): 2451 elif opts.get('currentdate'):
2452 date = dateutil.makedate() 2452 date = dateutil.makedate()
2453 elif ui.configbool('rewrite', 'update-timestamp'): 2453 elif (ui.configbool('rewrite', 'update-timestamp')
2454 and opts.get('currentdate') is None):
2454 date = dateutil.makedate() 2455 date = dateutil.makedate()
2455 datemaydiffer = True 2456 datemaydiffer = True
2456 else: 2457 else:
2457 date = old.date() 2458 date = old.date()
2458 2459