Patchwork D6841: uncommit: drop the hyphen from --current-user and --current-date

login
register
mail settings
Submitter phabricator
Date Sept. 11, 2019, 7:01 a.m.
Message ID <59904b6df47efd02d5f82040b25efa14@localhost.localdomain>
Download mbox | patch
Permalink /patch/41640/
State Not Applicable
Headers show

Comments

phabricator - Sept. 11, 2019, 7:01 a.m.
Closed by commit rHGa50661567f83: uncommit: drop the hyphen from --current-user and --current-date (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6841?vs=16509&id=16511

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6841/new/

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

AFFECTED FILES
  mercurial/cmdutil.py
  tests/test-uncommit.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t
--- a/tests/test-uncommit.t
+++ b/tests/test-uncommit.t
@@ -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)
 
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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):