Opened 11 years ago

Closed 11 years ago

Simplify configuration options into a single string

Reported by: Owned by: Lewis Baker ttressieres normal PerforcePlugin normal 0.10

Description

It would be nice if the configuration options for the PerforcePlugin could be specified in the <TRAC_ENV>/conf/trac.ini file's [trac] section variable repository_dir which is currently unused.

One suggested format is:

[trac]
repository_type = perforce


comment:1 Changed 11 years ago by ttressieres

Owner: changed from Lewis Baker to ttressieres

I have a first draft to resolve this task, maybe i could submit it this week-end.

comment:2 Changed 11 years ago by ttressieres

Status: new → assigned

Changed 11 years ago by ttressieres

first draft... to be better tested

comment:3 Changed 11 years ago by ttressieres

Resolution: → fixed assigned → closed

submit changes in [1323]

repository_dir can have two forms:

• p4
• the configuration is read from [perforce] section in trac.ini
• p4://user:ticket@host:port
• the [perforce] section is no more mandatory

Tee only setting necessary in [perforce] section is to specify unicode server, see #634 to remove this option.

comment:4 follow-up:  5 Changed 11 years ago by Lewis Baker

Resolution: fixed closed → reopened

I don't think you need to split up the 'host:port' part of the url as the Connection.port attribute accepts strings of this format.

The Connection.host attribute actually refers to the hostname of the Perforce client and so can just be left at its default value.

comment:5 in reply to:  4 Changed 11 years ago by ttressieres

I don't think you need to split up the 'host:port' part of the url as the Connection.port attribute accepts strings of this format.

The Connection.host attribute actually refers to the hostname of the Perforce client and so can just be left at its default value.

Hi Lewis, nice to habe some news from you.

I've setup Trac 0.10 with PerforcePlugin for my team last week, it works very well... Thank you for the great job !!!

I've corrected the small problem in [1340]

comment:6 follow-up:  7 Changed 11 years ago by Lewis Baker

[1340] looks good.

Was just thinking that you could use the url query string to allow setting additional options and dispense with the [perforce] section altogether.

eg. 'p4://username:password@perforce:1666?unicode=1'

comment:7 in reply to:  6 Changed 11 years ago by anonymous

[1340] looks good.

Was just thinking that you could use the url query string to allow setting additional options and dispense with the [perforce] section altogether.

eg. 'p4://username:password@perforce:1666?unicode=1'

Yes, nice idea, i will try to implement it today.

Maybe, we can also integrate solution to #694, with a string like this:

'p4://username:password@perforce:1666//path_to_part_of_depot?unicode=1'

comment:8 Changed 11 years ago by ttressieres

Resolution: → fixed reopened → closed

commit [1346], this one enables parsing such as

   'p4://username:password@perforce:1666/path_of_depot?key=val?key=val2'


with key could be unicode or language

The path_of_depot is not use yet, it could be used to close #694

comment:9 Changed 11 years ago by anonymous

is it possible to use a client spec name instead of path_of_depot? The solution to #694 has a client spec, which is much more powerful than a single path.

Modify Ticket

Change Properties