# HG changeset patch # User Pierre-Yves David # Date 1499767245 -7200 # Node ID 69fe16428b0f12915a88f7eadf35b3c5499a1f80 # Parent 3c371aa16cb933d0a6ccb4a6eeade0e790543ba5 uncommit: add support for -U and -D diff --git a/hgext3rd/evolve/evocommands.py b/hgext3rd/evolve/evocommands.py --- a/hgext3rd/evolve/evocommands.py +++ b/hgext3rd/evolve/evocommands.py @@ -223,7 +223,7 @@ '^uncommit', [('a', 'all', None, _('uncommit all changes when no arguments given')), ('r', 'rev', '', _('revert commit content to REV instead')), - ] + commands.walkopts + commitopts + commitopts2, + ] + commands.walkopts + commitopts + commitopts2 + commitopts3, _('[OPTION]... [NAME]')) def uncommit(ui, repo, *pats, **opts): """move changes from parent revision to working directory @@ -243,6 +243,7 @@ Return 0 if changed files are uncommitted. """ + _resolveoptions(ui, opts) # process commitopts3 wlock = lock = tr = None try: wlock = repo.wlock() diff --git a/tests/test-tutorial.t b/tests/test-tutorial.t --- a/tests/test-tutorial.t +++ b/tests/test-tutorial.t @@ -465,6 +465,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 (some details hidden, use --verbose to show complete help) diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t --- a/tests/test-uncommit.t +++ b/tests/test-uncommit.t @@ -384,3 +384,16 @@ date: Thu Jan 01 00:22:17 1970 +0000 summary: to-uncommit + +test -U option + + $ hg uncommit -U b + $ hg log -r . + changeset: 14:288da4a95941 + branch: bar + tag: tip + parent: 7:4f1c269eab68 + user: test + date: Thu Jan 01 00:22:17 1970 +0000 + summary: to-uncommit +