osimons wrote:
> On Oct 16, 11:12 pm, Remy Blank <[EMAIL PROTECTED]> wrote:
>
>> Christian Boos wrote:
>>
>>> I think it will be
>>> simpler to use the reponame (mount point) as the key.
>>> If the goal is simply to be able to change that mount point without
>>> doing a whole resync, we could add a `trac-admin <env> remount old new"
>>> command, which could do that in one go.
>>>
>> After hitting "send" on my first message, I figured the two issues are
>> actually orthogonal: currently, the reponame is used both as a unique
>> key and as the mount point, but nothing prevents us from separating the
>> two uses and adding a .mount option later. So yes, I went ahead and used
>> the reponame as the key.
>>
>
> I'm not sure I get the importance of adding this abstraction? I
> haven't been tracking the branch as closely as I should, but is it
> really important? Changing the mount point would invalidate all links
> and more, so it might as well invalidate everything and require a
> resync? Please don't make it too complex for the rest of us... :-)
>
>
Yes, I concur. Additionally, for not invalidating the links, you can
(already) setup aliases.
So for example, imagine you're tracking trac 0.12dev development in a
local mirror of trunk, you name it "0.12dev".
After some time (eventually...) that repository will be more adequately
displayed and named 0.12-stable.
At that time, you could do:
trac-admin <env> repository rename 0.12dev 0.12-stable
That will simply do an "update ... set key=<newname> where
key=<oldname>" on the relevant tables.
Then you would set up an alias: 0.12dev = 0.12-stable, so that old links
made for 0.12dev will now point to 0.12-stable.
Also, I think that the cached repositories shouldn't be configured in
the trac.ini, but instead made available by a separate repository module
provider, which would read the information from the 'repository' table.
In order to create and operate on those repositories, "trac-admin
repository" sub-commands would be used.
>>>> and would also allow having a mount point with
>>>> caps or the "." character, as requested at the bottom of
>>>> MultipleRepositorySupport.
>>>>
>>> That's a detail, we can easily get that by splitting at the last "." seen.
>>>
>> That will work for "." characters, but not for the case where mount
>> points should have uppercase letters like "MyModule", as the keys are
>> converted to lowercase by ConfigParser.
>>
>
> The ConfigParser does support case-sensitive option names, but not by
> default:
> from ConfigParser import ConfigParser
> myconfig = ConfigParser()
> myconfig.optionxform = str # support case-sensitive option names
> myconfig.options('trac')
> ==> [..... , 'MyOption', .....]
>
ConfigParser has many other annoying issues (doesn't take the order of
sections and entries into account, doesn't keep comments, does %
expansion, etc.), so we discussed in a few tickets that it might be
worth dropping it and simply parse the .ini file ourselves (we're
already writing it back ourselves anyway).
-- Christian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---