Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#632 closed task (fixed)

Simplify configuration options into a single string

Reported by: Lewis Baker 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 18 years ago.
first draft... to be better tested

Download all attachments as: .zip

Change History (10)

comment:1 Changed 18 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 18 years ago by ttressieres

Status: newassigned

Changed 18 years ago by ttressieres

Attachment: perforceplugin-632.patch added

first draft... to be better tested

comment:3 Changed 18 years ago by ttressieres

Resolution: fixed
Status: assignedclosed

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 Changed 18 years ago by Lewis Baker

Resolution: fixed
Status: closedreopened

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 18 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 Changed 18 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 18 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 18 years ago by ttressieres

Resolution: fixed
Status: reopenedclosed

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 17 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
Set your email in Preferences
Action
as closed The owner will remain ttressieres.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.