Open Bug 468725 Opened 16 years ago Updated 11 years ago

Generic exclusion of version control directories

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
minor

Tracking

()

People

(Reporter: vitaly.fedrushkov, Unassigned)

References

Details

Today we have glob() on template paths in multiple places, along with some ad hoc checks if directory is valid template container and not 'CVS'.

However, there are many version control systems around.  Localized templates and extensions may use others.

Stock 3.2 template include path contains:

 ./extensions/CVS/template/en/custom
 ./extensions/CVS/template/en/default
 ./extensions/example/template/en/custom
 ./extensions/example/template/en/default
 ./template/en/custom
 ./template/en/default

and things multiply with number of languages supported.

Perhaps we should override glob once to exclude known VC subsystems (notably Subversion, Bazaar, Mercurial, git).  And skip non-existent directories from template search path, too.
If we ignored hidden directories (ones that start with .), we'd handle every other system besides CVS, as far as I know. We could just do that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Not on Windows, where uppercase 'CVS' is used by most clients (and '.cvs' by cygwin).  For others, \.[a-z]+ will likely match.

Also leading dot and filesystem's hidden attribute are orthogonal.  It may be important as a difference between genuine VC checkouts and `tar xzf` archives made on other platforms.
Yes, I know all that, but my point was that all of the VCs that you mentioned will be handled by just excluding any directory that starts with a period.
Depends on: 457506
You need to log in before you can comment on or make changes to this bug.