[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: multiple bugtraq:urls

From: raita ohyama <raizo.japan_at_gmail.com>
Date: Tue, 27 Oct 2009 08:58:34 -0700 (PDT)

Hi, jaap.

I met a similar situation you had.
Unfortunately, TortoiseSVN 1.6.6 does not have such a convenient functionality.

But now, I found another way to solve this problem.

If you possible to put a html file in your http server, you will be able to use multiple bug-track systems, I hope.

The basic solution is that put like a gateway html between TortoiseSVN and your bug-track systems.

The gateway html works dispatching a target bug-track system by using the %BUGID% in bugtraq:url of TortoiseSVN property.
Then your TortoiseSVN request will be redirected a new URL which is constructed in the gateway html.

The gateway html expects that a %BUGID% contains actual issuer-id and new extend system-id.
So you need to add some new keyword at a issuer-id.

For example,
In case of an original issuer-id is 'id5555',
you would like to add system-id at the end of the issuer-id like 'id5555-ABC'

The gateway html will work like below.
If the system-id is 'ABC', the request will be redirected to a new URL which is related to 'ABC' keyword.

For example...
http://myserver/mygateway.html?%BUGID%
-- begin --
<html>
<head>
<script type="text/javascript">
<--
var str = 'http://myissues/current/';
var arg = location.search; // ?id5555-ABC
arg = arg.substring(1, arg.length); // id5555-ABC
var docID = arg.substring(0,6); // id5555
var sysID = arg.substring(7); // ABC

switch(sysID)
{
  case 'ABC':
    str = 'http://myissues/backup_000/';
    break;
  case 'DEF':
    str = 'http://myissues/backup_001/';
    break;
}

// redirection
setTimeout("link()",0);
function link() {
  location.href = str + '?do=details&id=' + docID;
}
-->
</script>
</head>
</html>

-- end --

You need to set your bugtraq:url property like below.
bugtraq:url http://myserver/mygateway.html?%BUGID%

Also need to set your bugtraq:logregx property like below.
line1: id[0-9]{4}(-[A-Z]+)*
line2: (id[0-9]{4}(-[A-Z]+)*)

This works make a hyper link at the matching keyword in your commit log.
e.g.
id5555 will be linked.
id5555-A will be linked.
id5555-5 will be linked only 'id5555' part.

I hope you can make it.

--rai

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2411712

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-27 17:00:45 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.