Ticket #632 (closed task: fixed)

Opened 7 years ago

Last modified 6 years ago

Simplify configuration options into a single string

Reported by: lewisbaker Assigned to: 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

perforceplugin-632.patch (1.3 kB) - added by ttressieres on 09/29/06 23:41:57.
first draft... to be better tested

Change History

09/29/06 23:38:53 changed 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.

09/29/06 23:39:08 changed by ttressieres

  • status changed from new to assigned.

09/29/06 23:41:57 changed by ttressieres

  • attachment perforceplugin-632.patch added.

first draft... to be better tested

09/30/06 11:10:10 changed by ttressieres

  • status changed from assigned to closed.
  • resolution set to fixed.

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.

(follow-up: ↓ 5 ) 10/03/06 00:23:44 changed by lewisbaker

  • status changed from closed to reopened.
  • resolution deleted.

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.

(in reply to: ↑ 4 ) 10/04/06 21:15:35 changed 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]

(follow-up: ↓ 7 ) 10/05/06 01:48:03 changed 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'

(in reply to: ↑ 6 ) 10/05/06 08:10:03 changed 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'

10/05/06 23:30:11 changed by ttressieres

  • status changed from reopened to closed.
  • resolution set to fixed.

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

12/01/06 01:03:26 changed 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/Change #632 (Simplify configuration options into a single string)




Change Properties
Action