comparison tests/test-qrecord.t @ 16458:55982f62651f

commit: add option to amend the working dir parent The --amend flag can be used to amend the parent of the working directory with a new commit that contains the changes in the parent in addition to those currently reported by "hg status", if there are any. The old commit is stored in a backup bundle in ".hg/strip-backup"(see "hg help bundle" and "hg help unbundle" on how to restore it). Message, user and date are taken from the amended commit unless specified. When a message isn't specified on the command line, the editor will open with the message of the amended commit. It is not possible to amend public changesets (see "hg help phases") or changesets that have children. Behind the scenes, first commit the update (if there is one) as a regular child of the current parent. Then create a new commit on the parent's parent with the updated contents. Then change the working copy parent to this new combined changeset. Finally, strip the amended commit and update commit created in the beginning. An alternative (cleaner?) approach of doing this is suggested here: http://selenic.com/pipermail/mercurial-devel/2012-March/038540.html It is currently not possible to amend merge commits or recursively, this can be added at a later time.
author Idan Kamara <idankk86@gmail.com>
date Wed, 18 Apr 2012 01:20:16 +0300
parents 46b991a1f428
children d71ada5a6a33
comparison
equal deleted inserted replaced
16457:91196ebcaeed 16458:55982f62651f
57 57
58 -A --addremove mark new/missing files as added/removed before 58 -A --addremove mark new/missing files as added/removed before
59 committing 59 committing
60 --close-branch mark a branch as closed, hiding it from the branch 60 --close-branch mark a branch as closed, hiding it from the branch
61 list 61 list
62 --amend amend the parent of the working dir
62 -I --include PATTERN [+] include names matching the given patterns 63 -I --include PATTERN [+] include names matching the given patterns
63 -X --exclude PATTERN [+] exclude names matching the given patterns 64 -X --exclude PATTERN [+] exclude names matching the given patterns
64 -m --message TEXT use text as commit message 65 -m --message TEXT use text as commit message
65 -l --logfile FILE read commit message from file 66 -l --logfile FILE read commit message from file
66 -d --date DATE record the specified date as commit date 67 -d --date DATE record the specified date as commit date