hg qnew

On this page

hg qnew#

create a new patch#

hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...

This command is provided by the mq extension.

qnew creates a new patch on top of the currently-applied patch (if any). The patch will be initialized with any outstanding changes in the working directory. You may also use -I/--include, -X/--exclude, and/or a list of files after the patch name to add only changes to matching files to the new patch, leaving the rest as uncommitted modifications.

-u/--user and -d/--date can be used to set the (given) user and date, respectively. -U/--currentuser and -D/--currentdate set user to current user and date to current date.

-e/--edit, -m/--message or -l/--logfile set the patch header as well as the commit message. If none is specified, the header is empty and the commit message is '[mq]: PATCH'.

Use the -g/--git option to keep the patch in the git extended diff format. Read the diffs help topic for more information on why this is important for preserving permission changes and copy/rename information.

Returns 0 on successful creation of a new patch.

Options

Every command accepts the global options.

-e

--edit

invoke editor on commit messages

-g

--git

use git extended diff format

-U

--currentuser

add "From: <current user>" to patch

-u

--user USER

add "From: <USER>" to patch

-D

--currentdate

add "Date: <current date>" to patch

-d

--date DATE

add "Date: <DATE>" to patch

-I

--include PATTERN [+]

include names matching the given patterns

-X

--exclude PATTERN [+]

exclude names matching the given patterns

-m

--message TEXT

use text as commit message

-l

--logfile FILE

read commit message from file

Options marked [+] can be repeated.