avoiding scans of whole directory tree
Adrian Buehlmann
adrian at cadifra.com
Thu May 29 12:07:18 CDT 2008
On 29.05.2008 17:50, Jamie Webb wrote:
> 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 '.*'.
Interesting. I will see if I can cook a patch for this.
More information about the Mercurial
mailing list