avoiding scans of whole directory tree
Matt Mackall
mpm at selenic.com
Thu May 29 15:44:23 UTC 2008
On Wed, 2008-05-28 at 14:53 +0100, Jamie Webb wrote:
> On 2008-05-28 15:13:18 Adrian Buehlmann wrote:
> > On 28.05.2008 14:22, Jamie Webb wrote:
> > > I'm talking about a slightly different thing. In the absence of
> > > inotify, 'hg edit' might help if the manifest is truly huge. But hg
> > > is worse than that: it slows right down if the workspace is large,
> > > even if the manifest is small.
> >
> > So, your use case is a large tree inside the working dir, of which
> > you want to track only a small number of files?
> >
> > And .hgignore doesn't help for this?
>
> Ignoring '.*' does indeed appear to work. But, why isn't it the
> default?
Umm, because most people don't want to ignore everything?
> That is, for 'hg commit', why does it bother looking at files
> that are not being tracked?
Commit looks for changed files to commit. And it reuses the same code
that status does, that returns a list of (modified, added, removed,
deleted, unknown). That last element isn't interesting for commit, but
since most users don't have significant numbers of unignored unknown
files in their workspaces, this isn't a problem for most people. But
yes, commit's status check could be made smarter.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list