avoiding scans of whole directory tree

Jamie Webb j at jwebb.sygneca.com
Thu May 29 10:50:19 CDT 2008


On 2008-05-29 10:44:23 Matt Mackall wrote:
> > Ignoring '.*' does indeed appear to work. But, why isn't it the
> > default? 
> 
> Umm, because most people don't want to ignore everything?

They do when committing.

> > 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.

Indeed. And it looks like that could be done simply by telling the
status logic that in this instance the ignore pattern is '.*'.

/J


More information about the Mercurial mailing list