Skip to main content

unshelve

unshelve

restore a shelved change to the working copy

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 (.sl/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. 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 cancel the conflict resolution and undo the unshelve, leaving the shelve bundle intact.

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 the order of backups. More than maxbackups backups are kept if same timestamp prevents from deciding exact order of them, for safety.

Returns 0 on success.

arguments

shortnamefullnamedefaultdescription
-a--abortabort an incomplete unshelve operation
-c--continuecontinue an incomplete unshelve operation
-k--keepkeep shelve after unshelving
-n--namerestore shelved change with given name
-t--toolspecify merge tool