Reputation: 17067
I have a file that's been modified recently. Rather than looking into each revision, is there an easier way to find out, in Mercurial, in which revision the file was last modified? Thanks.
Note that I am using command line in Linux.
Upvotes: 13
Views: 3180
Reputation: 26597
The answer of Autopulated is exactly what you are looking for if you just want to have a look on the last revision for a file.
I just wanted to mention the grep
command :
$ hg help grep
hg grep [OPTION]... PATTERN [FILE]...
search for a pattern in specified files and revisions
[...]
With hg grep
, you can search a particular file or the whole repository at any revision or range of revision for a particular pattern.
It is the kind of command which is really helpful if you're searching for the revision in which a particular method or variable was introduced or removed for example.
Upvotes: 4
Reputation: 25523
This will give you the last time a change was made to a particular file (increase 1 to N to see last N changes):
hg log -l 1 ./path/to/file
Upvotes: 20