Getting the difference between two branches in mercurial

How to find the difference between branches in hg

Distributed revisioning systems would allow multiple branches which could be local to your computer or in the remote ones.

One aspect of working in distributed revision systems is the ability to see the diff between the branches and make a decision off of that.

Let’s say you have branch named branch-one and the other being default repo.

If you want to know what difference is there between the two branches in mercurial, say what is in the branch-one but not in the default do:


hg log -r "'branch-one' - default"

There are also a couple of predicates that you can assign – just search with “hg revsets”

python headers are required to build mercurial error while installing

OK, I have been biking mercurial for a while and wanted to upgrade to the latest version
In the process of that, I got the error python headers are required to build mercurial
Here is the fix.
Just add

sudo apt-get install build-essential gcc python-dev

which it was missing.

For re-installation follow the steps listed on https://help.ubuntu.com/community/Mercurial

patching

Applying and using patch diff in mercurial

Applying/Commiting mercurial patches

You want to apply the changes you have to a repository or another branch
So, basically you want to apply the patch

See how to list all the files from given revision

Here are step by step procedures

Create the patch first. Being on your current repository do:

hg diff > mychanges.diff

BTW, you can achieve this though hg export also.

– Clone a new repository or move to the repo you want to apply the patch.

– move to your repository and apply the patch

hg import mychanges.diff

Using the above, you can apply the patch to mercurial and also see the applied path to the repository.

Also if you are on mercurial see:

How to list files in the revision

Solve the error python headears are required to mercurial

How to get the diff of two branches in mercurial

Do you like solving algorithms and improve your problem solving skills?

Given billion sequential but randomly listed numbers find the missing ones

Find the first occurrence of the number

outstanding uncommitted changes hg Mercurial Error

If you try to push the changes you have to the repository, you might come across outstanding uncommitted changes error in mercurial

It would happen when you have some changes pending in your local repository and you want to pull and rebase from the repository so that you can commit the changes you have

but, you might not want to push the changes even to your local repo.

here is the fix for it:
lets say the module you have is testHG which you cloned it from http://sometestHg/hg
1. Do hg clone testHG testHG_temp – create the clone of the current module, not copy!!
2. cd testHG_temp – move to your new clone
3. hg pull –rebase http://sometestHg/hg – note you have to actually go to the main repo
4. hg push http://sometestHg/hg

Then you can delete the temp directory you created
Happy mercuriying!!