Shelving and UnShelving TortoiseHG code on two separate computers?

8.3k views Asked by At

Can i shelve some code I've been working on, at work, with TortoiseHG .. go home .. pull/merge/update ... and then UnShelve and continue working at home?

Does TortoiseHG offer this?

At work, I created a new shelve and added all my 'touched' files into the shelve. But when I got home I couldn't find/see the shelve, etc.

4

There are 4 answers

2
Mark Tolonen On BEST ANSWER

The shelf is just a file on the local copy of the repository, so if you are working from another computer you won't see the shelf.

Note: TortoiseHg's implementation is just to create a diff in the file .hg\shelve, so potentially you could email the file home and place it in the .hg folder (being careful not to destroy an existing shelf of course!)

0
Joseph On

In Windows, you can automatically sync shelves using a cloud storage sync service like DropBox or Google Drive. Move the shelves directory (in .hg) to your cloud storage folder and replace it with a directory junction. You can create a directory junction by running this in the .hg directory:

mklink /h shelves C:/Users/<username>/Google Drive/shelves

Of course, replace the target with whatever location you are actually using. Repeat this on all computer you are using Mercurial on.

3
Lazy Badger On

MQ with pull|push including mq-patches maybe more natural way

1
Prophet On

You can put the files you are working on in DropBox (or similar) shared folder.
In this way you will always have synchronized copy of your file on several computers.
Maybe this is not the cleanest solution but it works.