metaedit: add support for the -D and -U options
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 23 Jul 2017 07:33:36 +0200
changeset 2769 b96349ae3e2a
parent 2768 85e5a56db776
child 2770 a9ea16a1f4dc
metaedit: add support for the -D and -U options
README
hgext3rd/evolve/evocommands.py
tests/test-metaedit.t
--- a/README	Sun Jul 23 07:32:54 2017 +0200
+++ b/README	Sun Jul 23 07:33:36 2017 +0200
@@ -128,6 +128,7 @@
     (same as uncommit, but accessible through the amend commit)
   - uncommit: add support for --current-date and --current-user option
   - fold: add support for --current-date and --current-user option
+  - metaedit: add support for --current-date and --current-user option
 
   - topic: add --age option to sort topic by the most recently touched,
   - topic: add a 't0' to access the root of a topic while keeping it active,
--- a/hgext3rd/evolve/evocommands.py	Sun Jul 23 07:32:54 2017 +0200
+++ b/hgext3rd/evolve/evocommands.py	Sun Jul 23 07:33:36 2017 +0200
@@ -431,7 +431,7 @@
     '^metaedit',
     [('r', 'rev', [], _("revision to edit")),
      ('', 'fold', None, _("also fold specified revisions into one")),
-    ] + commitopts + commitopts2,
+    ] + commitopts + commitopts2 + commitopts3,
     _('hg metaedit [OPTION]... [-r] [REV]'))
 def metaedit(ui, repo, *revs, **opts):
     """edit commit information
@@ -462,6 +462,7 @@
        See :hg:`help phases` for more about draft revisions, and
        :hg:`help revsets` for more about the `draft()` and `only()` keywords.
     """
+    _resolveoptions(ui, opts)
     revs = list(revs)
     revs.extend(opts['rev'])
     if not revs:
--- a/tests/test-metaedit.t	Sun Jul 23 07:32:54 2017 +0200
+++ b/tests/test-metaedit.t	Sun Jul 23 07:33:36 2017 +0200
@@ -209,7 +209,7 @@
   $ hg diff -r "10" -r "11" --hidden
 
 'fold' one commit
-  $ hg metaedit "desc(D2)" --fold --user foobar3
+  $ HGUSER=foobar3 hg metaedit "desc(D2)" --fold -U --config
   1 changesets folded
   $ hg log -r "tip" --template '{rev}: {author}\n'
   13: foobar3