Koc
Koc

Reputation: 2375

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.

Upvotes: 5

Views: 5668

Answers (3)

bjlaub
bjlaub

Reputation: 2727

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.

Upvotes: 9

in3xes
in3xes

Reputation: 714

hg status --change [rev]

ie,

hg status --change 0

and

hg log -v

Upvotes: 1

Karmastan
Karmastan

Reputation: 5696

You might want to look at the output of hg log -v. For each changeset, it should list the files modified in that changeset. If you had a particular changeset in mind, add the -r switch to specify it.

Upvotes: 0

Related Questions