tags:

views:

171

answers:

2

This seems like it should be obvious but I can't figure it out.

Suppose I have mercurial revisions 4 and 7 and I want to see which files changed between those revisions. I can do a hg diff -r 4 -r 7 to list the entire set of diffs... is there a way to just list the files that have changed?

+8  A: 
hg status --rev 4:7
dfa
you mean hg status? (DOHWWW: I didn't realize it accepted arguments.)
Jason S
accepted upon re-edit. (note for the confused, this used to say "hg st" which is shorthand for hg status)
Jason S
+3  A: 

You can use "hg log" for this.

hg log --verbose --rev=4:7 --style=changelog

Example:

$ hg log -v -r4:7 --style=changelog
2008-08-03 21:40 +0200  XXXXX  <[email protected]>  (475752c35880)

        * osinfo.py: new file.
        * os-info.py: deleted file.
        * os-info.py, osinfo.py:
        Rename os-info.py -> osinfo.py.

2008-08-03 21:52 +0200  XXXXXX  <[email protected]>  (babf6df75ff4)

        * iterate_file_lines.py, osinfo.py:
        Add keyword substitution strings.

2008-08-03 21:53 +0200  XXXXXX  <[email protected]>  (bc6fc22adb8e)

        * iterate_file_lines.py:
        Remove comment about coding conventions.

2008-08-08 19:43 +0200  XXXXXX  <[email protected]>  (dbea6914b20f)

        * .hgignore: new file.
        * .hgignore:
        Add .hgignore.
Cyberdrow
Oh! That's a little more verbose than I had in mind but I like being able to see the comments. Thanks!
Jason S
This doesn't actually show what the original poster wants to know. It lists all the changeset log entries, regardless of branch, for the range of revisions listed. You can use the -b flag to filter the answers to just those on a specific branch, but it doesn't help get you the list of files that are different between any two arbitrary revisions.
james woodyatt