Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pull in upstream changes into a fork using Mercurial?

Tags:

mercurial

I've forked a Mercurial repository, and now I want to pull the changes from the main repository into my fork. If this were git, I would do something like...

git remote add upstream <url> git pull upstream master 

How do I do this sort of thing in Mercurial?

like image 633
Jon Kruger Avatar asked Apr 21 '10 00:04

Jon Kruger


People also ask

How do I pull from upstream fork?

Go to your fork, click on Fetch upstream , and then click on Fetch and merge to directly sync your fork with its parent repo. You may also click on the Compare button to compare the changes before merging.

How do I fetch from upstream?

On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository. Select the Fetch upstream drop-down. Review the details about the commits from the upstream repository, then click Fetch and merge.


1 Answers

You could also modify your hgrc file in your repo

default = ssh://[email protected]/<my_user>/<my_repo> upstream = ssh://[email protected]/<other_user>/<other_repo> 

Then you can do

hg pull upstream 
like image 135
fmitchell Avatar answered Sep 20 '22 10:09

fmitchell