Help: unshelve

hg unshelve [OPTION]... [[-n] SHELVED]

restore a shelved change to the working directory

This command accepts an optional name of a shelved change to restore. If none is given, the most recent shelved change is used.

If a shelved change is applied successfully, the bundle that contains the shelved changes is moved to a backup location (.hg/shelve-backup).

Since you can restore a shelved change on top of an arbitrary commit, it is possible that unshelving will result in a conflict between your changes and the commits you are unshelving onto. If this occurs, you must resolve the conflict, then use "--continue" to complete the unshelve operation. (The bundle will not be moved until you successfully complete the unshelve.)

(Alternatively, you can use "--abort" to abandon an unshelve that causes a conflict. This reverts the unshelved changes, and leaves the bundle in place.)

If bare shelved change (without interactive, include and exclude option) was done on newly created branch it would restore branch information to the working directory.

After a successful unshelve, the shelved changes are stored in a backup directory. Only the N most recent backups are kept. N defaults to 10 but can be overridden using the "shelve.maxbackups" configuration option.

Timestamp in seconds is used to decide order of backups. More than "maxbackups" backups are kept, if same timestamp prevents from deciding exact order of them, for safety.

Selected changes can be unshelved with "--interactive" flag. The working directory is updated with the selected changes, and only the unselected changes remain shelved. Note: The whole shelve is applied to working directory first before running interactively. So, this will bring up all the conflicts between working directory and the shelve, irrespective of which changes will be unshelved.

options:

-a --abort abort an incomplete unshelve operation
-c --continue continue an incomplete unshelve operation
-i --interactive use interactive mode (EXPERIMENTAL)
-k --keep keep shelve after unshelving
-n --name NAME restore shelved change with given name
-t --tool VALUE specify merge tool
--date DATE set date for temporary commits (DEPRECATED)

global options ([+] can be repeated):

-R --repository REPO repository root directory or name of overlay bundle file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or debug)
--config CONFIG [+] set/override config option (use 'section.name=value')
--debug enable debugging output
--debugger start debugger
--encoding ENCODE set the charset encoding (default: UTF-8)
--encodingmode MODE set the charset encoding mode (default: strict)
--traceback always print a traceback on exception
--time time how long the command takes
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never) (default: auto)