how to push and pull updates between repositories on the local network?

Martin Jewiss May 30, 2012

Hi - this question really shows up my noob status with source control, apoligies if it's been asked and answered before.

I have 2 macs, one laptop and one desktop. Both have SourceTree installed. I've created a Mercurial repo on the laptop to manage an existing project. Then created a matching repo in BitBucket and can push changes to it fine.

I've just cloned the laptop repo to my desktop, which worked fine and I've set up remote access to the same BitBucket project. Push and Pull between the BitBucket repo and the desktop also work fine.

The part I'm having trouble understanding is how to configure the repos in SourceTree so that I can pull changes on the desktop repo directly into the laptop repo likewise, how to pull changes in the laptop repo directly into the desktop repo.

Maybe I'm missing something fundamental here and it's not possible? Any help most appreciated.

1 answer

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2012

You can create additional remotes on each machine pointing at the other as a way to sync directly, click on Settings in the top-right of the repo window and click Add. What URL you use to access the other machine depends on what transport you want to use; if the remote machine is available over a file share then you could use file://volume/path/to/repo, otherwise you'll have to set up a server of some kind on the remote machine in order to expose it. Options for that include running 'hg serve' temporarily on the other machine, or possibly setting up an ssh server - for more information, take a look at http://mercurial.selenic.com/wiki/PublishingRepositories

HTH

Martin Jewiss May 31, 2012

Thanks for the reply Steve, all sorted using /Volume/path/to/repo.

I was confused by the fact that when creating a new repo from the Bookmarks window, Source Path/URL has GUI buttons for both remote and local souces. The window that opens with Settings > Remote > Add only has a URL button in the GUI.

All working fine now that I know to type the path in manually. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events