Efficient way to check for the changeset of last changes of some file(s)?

Matt Mackall mpm at selenic.com
Wed May 2 09:18:51 CDT 2007


On Wed, May 02, 2007 at 03:39:32PM +0200, Marcin Kasperski wrote:
> Problem: for a couple of files I would like to know in which 
> changeset they were last changed (for every file separately).
> 
> At the moment it seems to me it can only be found via "hg log", 
> but then either one must use "hg log -l 1" for every file 
> separately, or call "hg log -v" and parse it carefully analysing 
> files: lines. Not very pleasant and not very efficient.

hg log <files> is the fastest way because it only visits changesets
which touch the files in question.

You might try:

hg log --template "{date} {files}\n" <file1> <file2>

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list