Modify

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#632 closed task (fixed)

Simplify configuration options into a single string

Reported by: lewisbaker Owned by: ttressieres
Priority: normal Component: PerforcePlugin
Severity: normal Keywords:
Cc: Trac Release: 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.

See also #2987.

One suggested format is:

[trac]
repository_type = perforce
repository_dir = p4://<user>:<password/ticket>@<host>:<port>

Attachments (1)

perforceplugin-632.patch (1.3 KB) - added by ttressieres 8 years ago.
first draft... to be better tested

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by ttressieres

  • Owner changed from lewisbaker to ttressieres

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

comment:2 Changed 8 years ago by ttressieres

  • Status changed from new to assigned

Changed 8 years ago by ttressieres

first draft... to be better tested

comment:3 Changed 8 years ago by ttressieres

  • Resolution set to fixed
  • Status changed from assigned to 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: Changed 8 years ago by lewisbaker

  • Resolution fixed deleted
  • Status changed from closed to 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 8 years ago by ttressieres

Replying to lewisbaker:

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: Changed 8 years ago by lewisbaker

[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 8 years ago by anonymous

Replying to lewisbaker:

[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 8 years ago by ttressieres

  • Resolution set to fixed
  • Status changed from reopened to 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 8 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.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ttressieres. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.