Notice: Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #156: issuetrackers.txt

File issuetrackers.txt, 9.3 kB (added by alwin, 4 years ago)

The description from tortoise-svn

Line 
1Integration of Subversion (GUI) clients with Bug Tracking Tools:
2================================================================================
3
4I. Preface
5----------
6This document is primarily intended for writers of various GUI clients for
7Subversion.  Clients such as TortoiseSVN, Subclipse, RapidSVN, PySVN and many
8others.
9
10The goal of this document is to outline a common technique for defining and then
11integrating these GUI clients with third party bug tracking software. 
12
13II. Introduction
14----------------
15It is very common in Software Development for changes to be related to a
16specific bug or issue ID. Users of bug tracking systems would like to associate
17the changes they make in Subversion with a specific ID in their bug tracking
18system. There are already a number of people that have integrated these systems
19with Subversion. They typically rely on the end user entering a log message on
20their commits in some kind of a specific format that can be parsed with a
21commit-hook or in some cases just on-the-fly in a web-based presentation of the
22commit info. This option is OK, but it is not very user-friendly and it places
23all of the integration within the bug tracking tool. When using a Subversion
24client, you can see the log message info, but there is no way to jump to the bug
25system.
26
27Subversion (GUI) clients can help both the users and the bug tracking tools in
28that task:
29
30- When the user enters a log message, a well defined line including the issue
31number associated with the commit can be added by the client automatically. This
32reduces the risk that the users enters the issue number in a way the bug
33tracking tools can't parse correctly and therefore won't know that the commit
34was associated with a specific issue. The users won't have to remember the
35format they have to use for each log message and each individual project - the
36client will take care of that.
37
38- When the user browses the log messages, there should be an easy way to fire up
39the webbrowser to see the issue associated with that log message/commit.
40
41III. Requirements
42-----------------
43To make the integration with bug tracking tools possible, a Subversion client
44needs some information about the bug tracking tool used in a project. That
45information should be available inside the working copy so that clients don't
46have to access the repository over a possibly very slow connection to get that
47information.
48
49The information a client needs is:
50
51- the URL pointing to the bug tracking tool
52- the format of the issue number it has to add to the log messages so the
53  bug tracking tool can recognize it. Or
54- a regular expression to parse the log message with to extract the issue number
55
56There are other things a Subversion (GUI) client could use to make the
57integration with bug tracking tools easier for the user, but these are
58essential for the integration to work.
59
60IV. Implementation
61------------------
62The required information for the clients is stored in *folder* properties. The
63reason we chose this path is explained in the FAQ at the end of this document.
64
65There are two different ways a client can integrate with an issue tracker. One
66is very basic but provides the user with a separate GUI to enter bug ID's,
67and the other one is based on regular expressions where the user has to enter
68the bug ID's directly into the log message.
69
70The following properties are defined which are used by both ways:
71
72name  : bugtraq:url
73value : (string)
74This value is the URL pointing to the bug tracking tool. The URL string should
75contain the substring "%BUGID%" which the client replaces with the issue number.
76That way the resulting URL will point directly to the correct issue.
77NOTE: The URL must be properly URI encoded by the user.
78This URL can be used by clients to create a link to the bug tracking tool when
79showing the logmessage of a revision.
80
81name  : bugtraq:warnifnoissue
82value : "true"/"yes" or "false"/"no"
83If set to "true", then the clients will warn the user if the issue text box is
84left empty. But it must not block the commit, only give the user a chance to
85enter an issue number in case (s)he forgot it.
86
87Properties used with the basic integration:
88
89name  : bugtraq:label
90value : (string)
91This can be used by a client as a GUI label describing the text box where the
92user has to enter the issue number. If this is not set, then a default value
93should be used, e.g. "Bug-ID / Issue-Number :". Keep in mind though that most
94GUI clients don't resize their windows according to the size of GUI elements. So
95keep the size of the label string below 20-25 chars.
96
97name  : bugtraq:message
98value : (string)
99If this property is set, then the client should show a text box in the commit
100window where the user can enter an issue number. 
101The value string of this property is used by the client to create an additional
102line added to the log message. The string must contain the substring "%BUGID%"
103which is replaced with the issue number the user entered before applied to the
104log message. The client will add the resulting string as a new line to the end
105of the log message the user entered:
106logmessage + "\n" + resultstring
107In case bugtraq:append is set to "false", then the log message is defined as
108resultstring + "\n" + logmessage
109The client should make sure that the string doesn't have multiple lines.
110If more than one issue number is entered by the user (separated by commas), the
111client must make sure that there's no whitespace chars before and after the
112comma. And also the whole issue number string must be trimmed.
113Note: if the bugtraq:logregex property is set, then this property should be
114ignored for parsing the log message but only be used to show the issue ID edit box.
115
116name  : bugtraq:number
117value : "true" or "false"
118If this property is set to "false", then the client allows any character entered
119in the issue text box. Any other value or if the property is missing then only
120numbers are allowed as the issue number. One exception is the ',' char, which is
121used to separate multiple issues.
122The client must never complain if the text box is left empty, i.e. if no issue
123number is given. Not all commits are assigned to an issue!
124Note: if the property bugtraq:logregex is set and this property is set to false,
125then the client should use the regex against the created string which is added
126to the log message to check if the bug ID is valid.
127
128name  : bugtraq:append
129value : "true" or "false"
130If set to "false", then the bugtraq:message part is inserted at the top of
131the log message, if "yes" or not set, then it's appended to the log message at
132the bottom.
133
134Properties used with the regex integration:
135
136name  : bugtraq:logregex
137value : (string)
138This property contains one or two regular expressions, separated by a newline.
139If only one expression is set, then the bare bug ID's must be matched in the
140groups of the regex string. Example:
141[Ii]ssue #?(\d+)
142
143If two expressions are set, then the first expression is used to find a
144string which relates to a bug ID but may contain more than just the bug ID
145(e.g. "Issue #123" or "resolves issue 123").
146The second expression is then used to extract the bare bug ID from the string
147extracted with the first expression.
148An example:
149if you want to catch every pattern "issue #XXX" and "issue #890, #789" inside
150a log message you could use the following regex strings:
151[Ii]ssue #?(\d+)(,? ?#?(\d+))+
152(\d+)
153
154The property bugtraq:logregex will override bugtraq:number and bugtraq:message.
155If both bugtraq:logregex and bugtraq:message are set, then bugtraq:message is
156only used if the user enters an issue ID in the edit box of the commit window.
157Both are used in the log window to find the URL's to point to the issuetracker.
158
159Please note:
160- All property names and values must be properly UTF8 encoded. The client should
161  take care of that when setting the properties.
162- If the properties are not set for a folder, the client should search upwards
163  in the working copy for them until the working copy root is reached.
164
165
166A. FAQ
167======
168Q: Why is the integration with bug tracking tools not defined by the Subversion
169   project?
170A: The Subversion developers want to keep Subversion "clean", i.e. they
171   concentrate on Subversions basic tasks.
172
173Q: Why don't you use a config file located on the server or revision properties
174   instead of folder properties?
175A: A config file located on the server and revision properties would mean that
176   a client would need to connect to the server each time the bugtracking
177   information is needed. On slow connections, this can take several seconds and
178   would make the GUI respond slower.
179
180Q: Isn't there a way to store the data in the repository, but having it also
181   stored in the working copy?
182A: Subversion doesn't provide such a feature (yet). And there's no way to be
183   sure that there ever will be such a feature. So we have to make use of that
184   what's already available.
185   Also, if the properties are set for each folder, then you can assign a
186   different bug tracking tool for a subfolder if you want to. Or you can
187   provide a different URL for each folder.
188
189Q: But if I have many folders, I have to add those properties to each one of
190   them! Isn't there a better way?
191A: Sorry, but no. But if you can be sure that each user checks out only from
192   e.g. /trunk/ and not some subfolder, then it's enough if you set the
193   properties there. The clients will search for those properties the path up
194   to the working copy root for those properties.

Ihr Browser versucht gerade eine Seite aus dem sogenannten Internet auszudrucken. Das Internet ist ein weltweites Netzwerk von Computern, das den Menschen ganz neue Möglichkeiten der Kommunikation bietet.

Da Politiker im Regelfall von neuen Dingen nichts verstehen, halten wir es für notwendig, sie davor zu schützen. Dies ist im beidseitigen Interesse, da unnötige Angstzustände bei Ihnen verhindert werden, ebenso wie es uns vor profilierungs- und machtsüchtigen Politikern schützt.

Sollten Sie der Meinung sein, dass Sie diese Internetseite dennoch sehen sollten, so können Sie jederzeit durch normalen Gebrauch eines Internetbrowsers darauf zugreifen. Dazu sind aber minimale Computerkenntnisse erforderlich. Sollten Sie diese nicht haben, vergessen Sie einfach dieses Internet und lassen uns in Ruhe.

Die Umgehung dieser Ausdrucksperre ist nach §95a UrhG verboten.

Mehr Informationen unter www.politiker-stopp.de.