> Hello,
>
> Is it possible to have .hgignore files in subfolders instead of one
> giant .hgignore for the entire repo?
No, you must collect your patterns at the top of the repository.
How many patterns do you have?
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://aragost.com/en/services/mercurial/blog/
_______________________________________________
Mercurial mailing list
Merc...@selenic.com
http://selenic.com/mailman/listinfo/mercurial
It's not (and I'd argue that this is a feature, not a bug).
Cheers,
Dirkjan
Is it possible to have .hgignore files in subfolders instead of one giant .hgignore for the entire repo?
--
Stian Østerhaug
No. But if you care about a scope of the pattern you can use subfolder
name as a prefix for the pattern, for example:
<my_sub_folder_1>/<my_sub_folder_2>/<my_sub_folder_3>/*.ext
<my_sub_folder_4>/*
No.
That would make it ambiguous which .hgignore applied and we would have
to define (confusing) rules for how multiple .hgignores should be combined.
We also want to avoid the performance overhead of looking for .hgignore
in every folder.
/Mads
I figure that the rules would be simple:
A .hgignore in a directory has the path to that directory prepended to all entries.
For any directory, concatenate all the .hgignore files starting from the repository root down to that directory, and process the result normally.
Is that confusing? Or are there some details that I'm overlooking?
>We also want to avoid the performance overhead of looking for .hgignore
>in every folder.
Is that really such a performance impact? Mercurial already needs to read every directory to figure out which files are tracked or not, so looking for extra .hgignore files seems like it would just add N in-memory string comparisons, where N is the total number of files present.
Has anyone actually tried measuring this?
eric