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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With