#8348 closed enhancement (fixed)
project index shows hidden folders like ".svn"
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | general | Version: | none |
Severity: | normal | Keywords: | bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
.svn: Error ([Errno 2] No such file or directory: '/var/www/vhosts/projects.xxx.net/httpdocs/projectsdb/.svn/VERSION')
Attachments (2)
Change History (15)
comment:1 by , 16 years ago
Milestone: | → 0.11.6 |
---|
follow-up: 3 comment:2 by , 16 years ago
… or read glob patterns from a .tracignore file in the TRAC_ENV_PARENT_DIR folder.
comment:3 by , 16 years ago
Replying to cboos:
… or read glob patterns from a .tracignore file in the TRAC_ENV_PARENT_DIR folder.
Ooh, unconventional but nifty!
comment:5 by , 15 years ago
Keywords: | bitesized added |
---|
comment:6 by , 15 years ago
from irc:
<MarGarina> Hi, It's Oren from the sprints :) - another room eventually. Regarding #8348, I guess that we'll want .tracignore to be pre-populated with .svn or even .*, but if it's in the projects directory, do we have a way to automatically deploy a default .tracignore file to the projects directory? <MarGarina> I mean, I guess that most sysadmins mkdir the projects root directory from scratch wherever they decide.. <cboos> MarGarina: maybe just consider that if there's no .tracignore, then it's like if the content is .svn (or .*, yes), but if there is one .tracignore, then just interpret its content strictly (better be explicit, and no big deal to add either .* or .svn)
by , 15 years ago
Attachment: | trac_8348_add_tracignore_for_project_listing.patch added |
---|
Project listing: ignore ".*" by default, or use .tracignore for a (crippled) wildcard list of files to ignore
comment:8 by , 15 years ago
Please just use something simple like fnmatch, no need for regexps here.
by , 15 years ago
Attachment: | trac_8348_add_tracignore_for_project_listing_new_plus_tests.patch added |
---|
This patch uses fnmatch instead, plus adds 2 unit tests (with and without .tracignore file)
comment:10 by , 15 years ago
Milestone: | next-minor-0.12.x → 0.12 |
---|
Patch looks good, but can be cleaned up a bit more:
- following our TracDev/CodingStyle is important
- no lines longer than 79 chars
- no spurious white space
s/[ ".*" ]/[".*"]
rpartition
is new in Python 2.5, we will still support 2.4 for 0.12- avoid
filter
, use list comprehensions (hint: you can nest them) - do the
f.close()
in afinally
block
And matches_ignore_patterns
could be probably be a one-liner (using from trac.util.compat import any
, rstrip("/")
)…
comment:11 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed a cleaned up and simplified patch in [9324].
comment:12 by , 15 years ago
Owner: | set to |
---|
Yes, we could ignore the most common ones, like
.svn
,.hg
, … Or maybe add aTRAC_ENV_PARENT_IGNORE
environment variable to specify them explicitly.