Opened 16 years ago
Closed 15 years ago
#8358 closed defect (fixed)
Config getpath() issues
Reported by: | osimons | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.5 |
Component: | general | Version: | 0.11-stable |
Severity: | normal | Keywords: | config |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
2 issues:
- The
getpath()
method is not available at configuration level. - The
Section.getpath()
does not do reading correctly.
Patch follows.
Attachments (3)
Change History (7)
by , 16 years ago
Attachment: | t8358-config_getpath-r8262-011.diff added |
---|
comment:1 by , 16 years ago
Actually, my second point does not seem to be correct (my mistake)… Updated patch shortly.
by , 16 years ago
Attachment: | t8358-config_getpath-r8262-011.2.diff added |
---|
Updated patch - only for point 1, and ignore 2…
comment:2 by , 16 years ago
So, latest patch basically addes getpath()
to config level and adds tests.
A number of places we use our own methods for converting to absolute path (like repository dir, plugins_dir, log file and so on). For these we use various bases, and converting these to standardize on getpath()
would lead to errors (all configs would need to be updated).
Basically this patch just makes the method of doing getpath()
available, and returns a result relative to the location of the config file the option is found in.
Wait a minute… One issue does actually remain with getpath()
. It does not actually support the Option
registry and it's own PathOption
… For that we would need a base from which to convert relative paths. What would we use? The project trac.ini location?
by , 15 years ago
Attachment: | t8358-config_getpath-r8288-011.diff added |
---|
Updated patch that also handles Option.registry
.
comment:3 by , 15 years ago
Milestone: | 0.11.6 → 0.11.5 |
---|---|
Version: | none → 0.11-stable |
The latest patch fixes all issues, I believe. It also includes reading relative paths from Option.registry
, and if configuration files are chained they will all keep a record of the location of the first file in the chain for use when calculating relative paths from option defaults. New tests are included.
It should be ready for 0.11.5. Testing welcome.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Last patch committed in [8303:8304].
Patch for the 2 getpath() issues in description + tests.