# HG changeset patch # User Pierre-Yves David # Date 1500787974 -7200 # Node ID 85e5a56db77685812179f419531f161279e91575 # Parent ab80ef8d0cfaafbc609c602621633a2787563a03 fold: add support for the -D and -U options diff -r ab80ef8d0cfa -r 85e5a56db776 README --- a/README Sun Jul 23 16:39:21 2017 +0200 +++ b/README Sun Jul 23 07:32:54 2017 +0200 @@ -126,6 +126,8 @@ - amend: add a --extract flag to move change back to the working copy (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 - 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, diff -r ab80ef8d0cfa -r 85e5a56db776 hgext3rd/evolve/evocommands.py --- a/hgext3rd/evolve/evocommands.py Sun Jul 23 16:39:21 2017 +0200 +++ b/hgext3rd/evolve/evocommands.py Sun Jul 23 07:32:54 2017 +0200 @@ -316,7 +316,7 @@ [('r', 'rev', [], _("revision to fold")), ('', 'exact', None, _("only fold specified revisions")), ('', 'from', None, _("fold revisions linearly to working copy parent")) - ] + commitopts + commitopts2, + ] + commitopts + commitopts2 + commitopts3, _('hg fold [OPTION]... [-r] REV')) def fold(ui, repo, *revs, **opts): """fold multiple revisions into a single one @@ -355,6 +355,7 @@ hg fold foo::@ --exact """ + _resolveoptions(ui, opts) revs = list(revs) revs.extend(opts['rev']) if not revs: diff -r ab80ef8d0cfa -r 85e5a56db776 tests/test-fold.t --- a/tests/test-fold.t Sun Jul 23 16:39:21 2017 +0200 +++ b/tests/test-fold.t Sun Jul 23 07:32:54 2017 +0200 @@ -200,5 +200,21 @@ o 0 - 1ea73414a91b r0 [debugbuilddag] (public) + $ hg fold --from 'desc("r4")' -U + 2 changesets folded + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg log -G + @ 15 - 91880abed0f2 r4 [test] (draft) + | + | o 12 - b568edbee6e0 r8 [debugbuilddag] (draft) + |/ + o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) + | + o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) + | + o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) + | + o 0 - 1ea73414a91b r0 [debugbuilddag] (public) + $ cd .. diff -r ab80ef8d0cfa -r 85e5a56db776 tests/test-tutorial.t --- a/tests/test-tutorial.t Sun Jul 23 16:39:21 2017 +0200 +++ b/tests/test-tutorial.t Sun Jul 23 07:32:54 2017 +0200 @@ -502,6 +502,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)