Commit 85e5a56d authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

fold: add support for the -D and -U options

parent ab80ef8d0cfa
......@@ -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,
......
......@@ -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:
......
......@@ -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 ..
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment