4

I installed the shelve extension for hg by adding 'shelve=' to [extensions]. I can verify this by running 'hg help extensions' which has the following in the output:

enabled extensions:

 extdiff  command to allow external programs to compare revisions
 fetch    pull, update and merge in one command
 shelve   Manage shelves of pickled objects.

I then type 'hg shelve' in a repo of mine, and I get:

hg: unknown command 'shelve'
Mercurial Distributed SCM
...

I would expect the shelve extension to run...

Mercurial verison is 2.0.2

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Josh Nankin
  • 2,518
  • 4
  • 28
  • 45

1 Answers1

0

The Shelve extension is distributed with Mercurial 2.8 and later, as mentioned here.

There is an older third party shelve extension that you can use with Mercurial 2.0.2, but it is not distributed with Mercurial and must be installed separately.

David Levesque
  • 22,181
  • 8
  • 67
  • 82
  • if it's not installed, then why is it staying the extension is enabled? If I add "whatever=" to my .hgrc, when I run hg i get: "*** failed to import extension whatever: No module named whatever" So it must be installed... – Josh Nankin Feb 26 '14 at 16:12
  • 1
    Based on the description "Manage shelves of pickled objects" it looks like it's not the Shelve extension but rather the Python library of the same name used for object persistence: http://docs.python.org/2/library/shelve.html This is very confusing indeed. – David Levesque Feb 26 '14 at 16:55
  • i just upgraded to the latest version of mercurial. all is good. – Josh Nankin Feb 26 '14 at 16:56
  • 5
    I'm on mercurial `3.9.1` and I get the same error message. – Michał Miszczyszyn Sep 20 '16 at 10:44
  • 3
    It's because plugin by default is disabled. Open "TortoiseHg Workbench" ui client. Then navigate through menu File->Settings->Extensions. And select "shelve" checkbox press "ok". – Nazar Mandzyk Aug 17 '17 at 14:36
  • 3
    I don't understand how this answers the question – StayOnTarget Nov 28 '17 at 20:10