[PATCH 3 of 3] log: speed up hg log for untracked files (issue1340)
adrian at cadifra.com
Thu Oct 11 04:56:56 CDT 2012
On 2012-09-14 09:01, S Muralidhar wrote:
> # HG changeset patch
> # User smuralid
> # Date 1347605445 25200
> # Node ID 63c805ab2a6385face9e89093202c66a5cfc966e
> # Parent 2597f6ccb7a0402a543425f7596a11af9079911c
> log: speed up hg log for untracked files (issue1340)
> 'hg log' on untracked files tends to be fairly slow. The root cause is that we end up using the 'slowpath' when we can't find a revlog for the files listed. This could happen if the file in question is an untracked file, or it is a directory.
> This diff tries to speed up 'hg log' (by avoiding the slowpath) for files if we can determine if that file is not (and was never) a directory. We use the previously added store.__contains__ methods to test if the directory exists (or existed) in the store.
> To avoid changing any existing semantics, this 'optimization' kicks in only when none of the files listed as arguments to the hg log command exist in the store.
For future reference, please keep the line length of change messages
under 80 characters, thanks.
More information about the Mercurial-devel