If I add something to a Mercurial shelf on the command line:
C:> hg shelve ...
when I then look in TortoiseHG Workbench under the Repository > Shelve > menu, there is NO new corresponding entry (in the dropdown).
Likewise, if I do the opposite and perform a shelving operation in THG, and then run hg shelve -l or just hg unshelve on the command line, it seems to ignore the new shelf.
Why is this happening? Is there a setting or something like that which is affecting this?
The shelving features in 'core' Mercurial (command line
hg) and the TortoiseHG GUI are totally independent of each other, as far as I am aware.(Historically, this strange-seeming situation resulted from, I believe, the THG feature being created first before an equivalent / similar feature with the same name was later added to HG proper).
IMO the HG shelving feature works better than the THG feature from the standpoint of efficiently using HG merge logic to apply shelved changes to the local working folder during an unshelve operation. Once I realized that, I never use the THG shelf any longer, and that is what I recommend.
It is possible to configure THG Workbench to integrate (to a certain extent) with the HG shelving feature. Instructions:
Edit your
mercurial.inisettings file. (Either through File > Settings > Gobal Settings > Edit File button, OR open the file in an editor manually).Add the following sections & items:
and
(careful not to duplicate any existing
[tortoisehg]or[tortoisehg-tools]sections).This will yield new buttons on the toolbar:
One arrow will shelve the current working folder, the other will unshelve.
Obviously running shelve/unshelve this way is rather coarse-grained but I find that 99% of the time that's all I need.
Notes:
The
.INIedits above can also be done through the THG Workbench File > Settings > Tools GUI section.:You don't have to use these particular icons if you prefer something else, THG has other choices.