Shelving and UnShelving TortoiseHG code on two separate computers?
Asked Answered
H

4

9

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.

Hesky answered 18/10, 2011 at 21:9 Comment(0)
P
15

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!)

Parchment answered 18/10, 2011 at 21:17 Comment(2)
SO if i wanted to work on some 'incomplete' code from home, is shelving the correct solution, here? (and following your suggestion, above?)Hesky
Transporting the shelf isn't the best solution. Easiest way is to work from a laptop and bring it home with you, or sync your local repo directory to a USB key.Parchment
S
2

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

Shoulders answered 18/10, 2011 at 22:37 Comment(3)
er.. can u please elaborate. that makes no sense to me (i'm new at this TortoiseHG stuff)...Hesky
Shelves aren't "transportable" between repos. Mercurial Queues Extension allow you transmit over repo not only changesets, but MQ-patches alsoShoulders
I think this is the most correct approach. The question assumed that using shelve was the best way to do this, but I think that assumption was quesitonable.Unstopped
H
2

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.

Hargis answered 4/9, 2013 at 14:14 Comment(0)
K
-1

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.

Knighthead answered 13/2, 2017 at 14:18 Comment(1)
This approach is not specific to Mercurial in any wayUnstopped

© 2022 - 2024 — McMap. All rights reserved.