Sudah sangat umum dalam Pengembangan Software untuk perubahan dikaitkan ke ID bug atau isu tertentu. Para pengguna dari sistem pelacakan bug (pelacak isu) ingin mengaitkan perubahan yang mereka lakukan dalam Subversion dengan ID tertentu dalam pelacak isu mereka. Kebanyakan pelacak isu menyediakan naskah hook pre-commit yang mengoper log pesan untuk mencari bug ID dimana komit dikaitkan. Ini cenderung merupakan kesalahan karena ia tergantung pada pengguna untuk menulis log pesan dengan benar agar naskah hook pre-commit bisa mengurainya dengan benar.
TortoiseSVN bisa membantu pengguna dalam dua cara:
Ketika pengguna memasukan log pesan, baris yang didefinisikan dengan baik yang termasuk didalamnya adalah nomor isu terkait dengan komit tersebut bisa ditambahkan secara otomatis. Ini mengurangi resiko bahwa pengguna memasukan nomor isu dalam hal piranti pelacakan bug tidak bisa mengurai dengan benar.
Atau TortoiseSVN bisa menerangi bagian dari log pesan yang dimasukan yang dikenal oleh pelacak isu. Cara itu pengguna mengetahui bahwa log pesan bisa diurai dengan benar.
Ketika pengguna melihat log pesan, TortoiseSVN membuat link dari setiap bug ID dalam log pesan yang memicu browser ke isu yang disebutkan.
You can integrate a bug tracking tool of your choice in TortoiseSVN. To do this, you have to define some properties, which start with
bugtraq:. They must be set on Folders: (bagian bernama “Seting Proyek”)
When you edit any of the bugtraq properties a special property editor is used to make it easier to set appropriate values.
There are two ways to integrate TortoiseSVN with issue trackers. One is based on simple strings, the other is based on regular expressions. The properties used by both approaches are:
Set this property to the URL of your bug tracking tool. It must be properly URI encoded and it has to contain
%BUGID% is replaced with the Issue number you entered. This allows TortoiseSVN to display a link in the log dialog, so when you are looking at the revision log you can jump directly to your bug tracking tool. You do not have to provide this property, but then TortoiseSVN shows only the issue number and not the link to it. e.g the TortoiseSVN project is using
You can also use relative URLs instead of absolute ones. This is useful when your issue tracker is on the same domain/server as your source repository. In case the domain name ever changes, you don't have to adjust the
bugtraq:url property. There are two ways to specify a relative URL:
If it begins with the string
^/ it is assumed to be relative to the repository root. For example,
^/../?do=details&id=%BUGID% will resolve to
https://tortoisesvn.net/?do=details&id=%BUGID% if your repository is located on
A URL beginning with the string
/ is assumed to be relative to the server's hostname. For example
/?do=details&id=%BUGID% will resolve to
https://tortoisesvn.net/?do=details&id=%BUGID% if your repository is located anywhere on
Set this to
true, if you want TortoiseSVN to warn you because of an empty issue-number text field. Valid values are
true/false. If not defined,
false is assumed.
Dalam pendekatan sederhana, TortoiseSVN menampilkan kepada pengguna field input terpisah dimana bug ID bisa dimasukan. Lalu baris terpisah ditambahkan/prepended ke log pesan yang dimasukan pengguna.
This property activates the bug tracking system in Input field mode. If this property is set, then TortoiseSVN will prompt you to enter an issue number when you commit your changes. It's used to add a line at the end of the log message. It must contain
%BUGID%, which is replaced with the issue number on commit. This ensures that your commit log contains a reference to the issue number which is always in a consistent format and can be parsed by your bug tracking tool to associate the issue number with a particular commit. As an example you might use
Issue : %BUGID%, but this depends on your Tool.
This text is shown by TortoiseSVN on the commit dialog to label the edit box where you enter the issue number. If it's not set,
Bug-ID / Issue-Nr: will be displayed. Keep in mind though that the window will not be resized to fit this label, so keep the size of the label below 20-25 characters.
If set to
true only numbers are allowed in the issue-number text field. An exception is the comma, so you can comma separate several numbers. Valid values are
true/false. If not defined,
true is assumed.
Properti ini mendefinisikan jika bug-ID ditambahkan (true) ke akhir dari log pesan atau disisipkan (false) di awal dari log pesan. Nilai yang benar adalah
true/false. Jika tidak didefinisikan, dianggap
true, maka proyek yang sudah ada tidak terpisah.
In the approach with regular expressions, TortoiseSVN doesn't show a separate input field but marks the part of the log message the user enters which is recognized by the issue tracker. This is done while the user writes the log message. This also means that the bug ID can be anywhere inside a log message! This method is much more flexible, and is the one used by the TortoiseSVN project itself.
This property activates the bug tracking system in Regex mode. It contains either a single regular expressions, or two regular expressions separated by a newline.
If two expressions are set, then the first expression is used as a pre-filter to find expressions which contain bug IDs. The second expression then extracts the bare bug IDs from the result of the first regex. This allows you to use a list of bug IDs and natural language expressions if you wish. e.g. you might fix several bugs and include a string something like this: “This change resolves issues #23, #24 and #25”.
If you want to catch bug IDs as used in the expression above inside a log message, you could use the following regex strings, which are the ones used by the TortoiseSVN project:
The first expression picks out “issues #23, #24 and #25” from the surrounding log message. The second regex extracts plain decimal numbers from the output of the first regex, so it will return “23”, “24” and “25” to use as bug IDs.
Breaking the first regex down a little, it must start with the word “issue”, possibly capitalised. This is optionally followed by an “s” (more than one issue) and optionally a colon. This is followed by one or more groups each having zero or more leading whitespace, an optional comma or “and” and more optional space. Finally there is a mandatory “#” and a mandatory decimal number.
If only one expression is set, then the bare bug IDs must be matched in the groups of the regex string. Example:
[Ii]ssue(?:s)? #?(\d+) This method is required by a few issue trackers, e.g. trac, but it is harder to construct the regex. We recommend that you only use this method if your issue tracker documentation tells you to.
If you are unfamiliar with regular expressions, take a look at the introduction at https://en.wikipedia.org/wiki/Regular_expression, and the online documentation and tutorial at http://www.regular-expressions.info/.
It's not always easy to get the regex right so to help out there is a test dialog built into the bugtraq properties dialog. Click on the button to the right of the edit boxes to bring it up. Here you can enter some test text, and change each regex to see the results. If the regex is invalid the edit box background changes to red.
bugtraq:logregex properti keduanya di-set,
logregex diproses lebih dulu.
Meskipun Anda tidak mempunyai pelacak isu dengan hook pre-commit menguraikan log pesan Anda, Anda masih bisa menggunakan ini untuk kembali ke isu seperti disebutkan dalam log pesan ke dalam link!
And even if you don't need the links, the issue numbers show up as a separate column in the log dialog, making it easier to find the changes which relate to a particular issue.
tsvn: properties require a
true/false value. TortoiseSVN also understands
yes as a synonym for
no as a synonym for
These properties must be set on folders for the system to work. When you commit a file or folder the properties are read from that folder. If the properties are not found there, TortoiseSVN will search upwards through the folder tree to find them until it comes to an unversioned folder, or the tree root (e.g.
C:\) is found. If you can be sure that each user checks out only from e.g
trunk/ and not some sub-folder, then it's enough if you set the properties on
trunk/. If you can't be sure, you should set the properties recursively on each sub-folder. A property setting deeper in the project hierarchy overrides settings on higher levels (closer to
As of version 1.8, TortoiseSVN and Subversion use so called
inherited properties, which means a property that is set on a folder is automatically also implicitly set on all subfolders. So there's no need to set the properties on all folders anymore but only on the root folder.
For project properties only, i.e.
webviewer: you can use the Recursive checkbox to set the property to all sub-folders in the hierarchy, without also setting it on all files.
When you add new sub-folders to a working copy using TortoiseSVN, any project properties present in the parent folder will automatically be added to the new child folder too.
Because the issue tracker integration depends upon accessing Subversion properties, you will only see the results when using a checked out working copy. Fetching properties remotely is a slow operation, so you will not see this feature in action from the repo browser unless you started the repo browser from your working copy. If you started the repo browser by entering the URL of the repository you won't see this feature.
For the same reason, project properties will not be propagated automatically when a child folder is added using the repo browser.
This issue tracker integration is not restricted to TortoiseSVN; it can be used with any Subversion client. For more information, read the full Issue Tracker Integration Specification in the TortoiseSVN source repository. (bagian bernama “lisensi” explains how to access the repository.)
The previous section deals with adding issue information to the log messages. But what if you need to get information from the issue tracker? The commit dialog has a COM interface which allows integration an external program that can talk to your tracker. Typically you might want to query the tracker to get a list of open issues assigned to you, so that you can pick the issues that are being addressed in this commit.
Any such interface is of course highly specific to your issue tracker system, so we cannot provide this part, and describing how to create such a program is beyond the scope of this manual. The interface definition and sample plugins in C# and C++/ATL can be obtained from the
contrib folder in the TortoiseSVN repository. (bagian bernama “lisensi” explains how to access the repository.) A summary of the API is also given in Bab 7, IBugtraqProvider interface. Another (working) example plugin in C# is Gurtle which implements the required COM interface to interact with the Google Code issue tracker.
For illustration purposes, let's suppose that your system administrator has provided you with an issue tracker plugin which you have installed, and that you have set up some of your working copies to use the plugin in TortoiseSVN's settings dialog. When you open the commit dialog from a working copy to which the plugin has been assigned, you will see a new button at the top of the dialog.
In this example you can select one or more open issues. The plugin can then generate specially formatted text which it adds to your log message.