hg log and directories
smuralid at yahoo.com
Thu Sep 6 23:00:09 CDT 2012
Thank you for the really quick response, Matt. Let me take a crack at this
From: Matt Mackall <mpm at selenic.com>
To: S Muralidhar <smuralid at yahoo.com>
Cc: "mercurial-devel at selenic.com" <mercurial-devel at selenic.com>
Sent: Thursday, September 6, 2012 7:52 PM
Subject: Re: hg log and directories
On Thu, 2012-09-06 at 17:27 -0700, S Muralidhar wrote:
> Hi folks,
> I'd like a bit of guidance on an issuing I'm tracking.
> I'm looking into fixing Issue 1340:
> (http://bz.selenic.com/show_bug.cgi?id=1340) - which complains about
> "hg log" being slow for untracked files.
> The root case seems to be in function walkchangerevs() in cmdutil.py,
> which checks to see if the specified file has a revlog. If not, it
> decides to use a "slow path" (that walks the revision tree backwards
> to see if there the file existed as of that revision).
The fncache is implemented as a subclass of a 'basicstore' in store.py,
partly to solve this exact problem (which we've obviously known about
for a long time). Store objects are the ones charged with knowing how to
map filenames in history to filenames in store, so this is the right
level to add a method to ask 'have we ever seen this path?'. You'll
probably want one in basicstore that queries the fs, and another in the
fncachestore that queries the cache, and not the fs. The latter might
not be instantaneous, but will be a lot faster than the log slow path.
I'd prefer to see a method named something like "__contains__(self,
path)" rather than "isorwasdir" though.
Mathematics is the supreme nostalgia of our time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel