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

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

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

570 views 1 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you