hg log with files is very slow

Matt Mackall mpm at selenic.com
Tue Jul 8 11:10:33 CDT 2008


On Tue, 2008-07-08 at 18:47 +1000, Brian Wallis wrote:
> Thanks for the explanation.
> >
> > Yep, it's indeed very slow. That's why it's hidden under the debug
> > switch.
> 
> With the given style file that lists all the files in each changeset  
> it is just as slow with or without the --debug switch.
> 
> Is there a quicker way to get a list of changesets and the affected  
> files. The plugin needs this to display file versions in the project  
> explorer. This feature can be turned of (because it is slow) but it is  
> nice to have that information.
>
> What might be better is if there is a way to list all the files in the  
> workspace and what the changeset id is for the last change made to  
> that file. Is that possible?

How about something like:

hg log -q -l1 -r <rev>:0 <file>

eg:

$ hg log -ql1 -r 5000:0 hg
4635:63b9d2deed48

Or for the working directory:
$ hg log -qfl1 hg
5531:a3fe91b4f6eb

Doing this across 5000 files won't be fast (mostly owing to execing hg
5000 times), but on a directory's worth of files, it won't be too bad.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list