tags:

views:

191

answers:

2

I would like to see all revision numbers that made any changes to a particular file. The output should look like follows:

20
27
59

If it is not possible, is it possible with Git?

Thank you.

+2  A: 

With git, you can run

git rev-list HEAD -- path/to/file

and you'll see a list of the commits which changed that file. Note that you can also run for example

gitk --all path/to/file

to open gitk, only showing commits for that file

Gareth
+3  A: 

Use the template system in Mercurial. To get the revision number for the file README you'll do:

hg log --template '{rev}\n' README

If you need the changeset hashes instead, then it's:

hg log --template '{node|short}\n' README

See hg help templating for more help. You can find the same help online (search for "Template Usage").

Martin Geisler
+1 for using templates
dfa
Yeah, templates are a much under-used part of Mercurial.
Martin Geisler