The shelve extension provides the shelve command to let you choose which parts of the changes in a working directory you'd like to set aside temporarily, at the granularity of patch hunks. You can later restore the shelved patch hunks using the unshelve command.

The shelve extension has been adapted from Mercurial's record extension.

See hg shelve --help for the complete list of commands.

For more information please visit the hgshelve website.

Starting from version 2.8, Mercurial includes its own shelve extension, which operates differently (more like Git's stash command) and supports conflict resolution during unshelving. Consider using that.

Developer Info

Like Mercurial, hgshelve comes with regression test suite to verify its core functionality as changes are being made. To run this test suite, you need the Mercurial source package:

$ cd your-hgshelve-repo
$ /path/to/hg-repo/tests/run-tests.py
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.