D5483: amend:Added current time update config option(issue5828)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed Dec 26 08:02:32 EST 2018


yuja added a comment.


  > +#if updatetime option is turned on
  >  +  $ hg amend --date '1997-1-1 0:1'
  
  Use `--config` unless you need to re-run the whole tests with various options.
  
  > +  $ hg log --limit 2
  >  +  # changeset:   40473:a092f9df5a43
  >  +  # branch:      stable
  >  +  # bookmark:    @
  >  +  # tag:         tip
  >  +  # parent:      40406:https://phab.mercurial-scm.org/rHG7b48c616431d49f6ccff4cbbd155a27c46a14ff0
  >  +  # user:        Taapas Agrawal<taapas2897 at gmail.com>
  >  +  # date:        Wed Jan 01 00:01:00 1997 +0530
  >  +  # summary:     amend:Added current time update config option(issue5828)
  
  Huh? What happened here?
  
  > +coreconfigitem('experimental', 'updatetime',
  >  +    default=False,
  >  +)
  
  Martin showed a better name. `rewrite.update-timestamp` sounds good to me.
  (I don't know which is a proper term, `timestamp` or `time-stamp`.)
  
  https://phab.mercurial-scm.org/D4876#74017
  
  > +        update = ui.configbool('experimental','updatetime')
  >  +        if update==True:
  >  +            date=dateutil.parsedate(datetime.datetime.today().strftime("%Y-%m-%d %H:%M:%S"))
  
  See `commands.graft()` for how to get a current timestamp.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5483

To: taapas1128, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list