The command hg log -v -r 2:5
can be used to see details on changesets 2/3/4/5 - is there a similar way you can view changeset details on JUST changesets 2 and 5?
Asked
Active
Viewed 1,097 times
3

Marcus Leon
- 55,199
- 118
- 297
- 429
1 Answers
8
Use separate -r
specifiers:
hg log -v -r 2 -r 5
It will give you the log entries in the same order you specify rev numbers.
Here's a test which demonstrates this:
mkdir hgTest; cd hgTest; hg init; echo "0" > 0.txt; hg addremove; hg commit -m "Added file 0.txt"; echo "1" > 1.txt; hg addremove; hg commit -m "Added file 1.txt"; echo "2" > 2.txt; hg addremove; hg commit -m "Added file 2.txt"
Now run hg log -v -r 0 -r 2
in the hgTest directory, and you'll see:
changeset: 0:22deafd4b5da
user: aUser
date: Fri Mar 25 17:37:01 2011 +0000
files: 0.txt
description:
Added file 0.txt
changeset: 2:39fedf6f9f56
tag: tip
user: aUser
date: Fri Mar 25 17:37:01 2011 +0000
files: 2.txt
description:
Added file 2.txt
Notice there's no mention of the file 1.txt
which was added in revision 1.

occulus
- 16,959
- 6
- 53
- 76
-
I believe this will compare all repository changes between 2 and 5 but we are only interested in changes for files that were checked in as part of 2 and 5 - not files which were only included in changesets 3 and 4 – Marcus Leon Mar 25 '11 at 17:18
-
No, it gives you the changed files in those revisions only. Try it and see, it only takes a few seconds to make a new repository and do a few test commits. – occulus Mar 25 '11 at 17:26
-
Ok, have added an example to my answer. – occulus Mar 25 '11 at 17:39