Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare two revisions in Mercurial?

I need to know what files have been added/modified/removed between two revisions. What I do:

hg status --rev 10:11

It looks okay. But when I have only one revision (initial = 0) it doesn't work.

# not work
hg status --rev 0:0
# also not work as I want
hg status --rev 0

There is no revision -1.

like image 789
Koc Avatar asked Jul 08 '10 07:07

Koc


2 Answers

The special revision null is used to indicate the parent of revision 0. You can use

hg status --rev null:0

to see the changes in the first revision.

like image 170
bjlaub Avatar answered Oct 21 '22 03:10

bjlaub


hg status --change [rev]

ie,

hg status --change 0

and

hg log -v
like image 32
in3xes Avatar answered Oct 21 '22 04:10

in3xes