changeset 42920:a50661567f83

uncommit: drop the hyphen from --current-user and --current-date I didn't pay enough attention to these long forms- graft, amend and MQ already use the old style naming. It's probably more important to be consistent than modern. The hypenated style came from evolve. Yuya mentioned this naming discrepancy in 4145fd3569c3, but it didn't attract any discussion[1]. There's also a bit of inconsistency in that the default parameter for `currentdate` is `False` for graft, and `None` for the rest. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-January/126767.html Differential Revision: https://phab.mercurial-scm.org/D6841
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 10 Sep 2019 22:04:22 -0400
parents 6ccf539aec71
children 4690902850df
files mercurial/cmdutil.py tests/test-uncommit.t
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Sep 09 13:25:00 2019 -0400
+++ b/mercurial/cmdutil.py	Tue Sep 10 22:04:22 2019 -0400
@@ -101,9 +101,9 @@
 ]
 
 commitopts3 = [
-    (b'D', b'current-date', None,
+    (b'D', b'currentdate', None,
      _(b'record the current date as commit date')),
-    (b'U', b'current-user', None,
+    (b'U', b'currentuser', None,
      _(b'record the current user as committer')),
 ]
 
@@ -186,9 +186,9 @@
     """modify commit options dict to handle related options
     """
     # N.B. this is extremely similar to setupheaderopts() in mq.py
-    if not opts.get(b'date') and opts.get(b'current_date'):
+    if not opts.get(b'date') and opts.get(b'currentdate'):
         opts[b'date'] = b'%d %d' % dateutil.makedate()
-    if not opts.get(b'user') and opts.get(b'current_user'):
+    if not opts.get(b'user') and opts.get(b'currentuser'):
         opts[b'user'] = ui.username()
 
 def ishunk(x):
--- a/tests/test-uncommit.t	Mon Sep 09 13:25:00 2019 -0400
+++ b/tests/test-uncommit.t	Tue Sep 10 22:04:22 2019 -0400
@@ -42,8 +42,8 @@
    -l --logfile FILE             read commit message from file
    -d --date DATE                record the specified date as commit date
    -u --user USER                record the specified user as committer
-   -D --current-date             record the current date as commit date
-   -U --current-user             record the current user as committer
+   -D --currentdate              record the current date as commit date
+   -U --currentuser              record the current user as committer
   
   (some details hidden, use --verbose to show complete help)