hg qimport

hg qimport#

import a patch or existing changeset#

hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]...

This command is provided by the mq extension.

The patch is inserted into the series after the last applied patch. If no patches have been applied, qimport prepends the patch to the series.

The patch will have the same name as its source file unless you give it a new one with -n/--name.

You can register an existing patch inside the patch directory with the -e/--existing flag.

With -f/--force, an existing patch of the same name will be overwritten.

An existing changeset may be placed under mq control with -r/--rev (e.g. qimport --rev . -n patch will place the current revision under mq control). With -g/--git, patches imported with --rev will use the git diff format. See the diffs help topic for information on why this is important for preserving rename/copy information and permission changes. Use `hg qfinish` to remove changesets from mq control.

To import a patch from standard input, pass - as the patch file. When importing from standard input, a patch name must be specified using the --name flag.

To import an existing patch while renaming it:

hg qimport -e existing-patch -n new-name

Returns 0 if import succeeded.

Options

-e

--existing

import file in patch directory

-n

--name NAME

name of patch file

-f

--force

overwrite existing files

-r

--rev REV [+]

place existing revisions under mq control

-g

--git

use git extended diff format

-P

--push

qpush after importing

Options marked [+] can be repeated.