I am new to SVN tools in the Java domain. We have a situation where we have developed an application for a previous client, and now we will customize this application for another client. The problem is that we will need to import bugfixes from the previous system to the new system, as bugs/changes are introduced in production. We will need to do this from time to time. However, we do not want to take all changes, just the most critical changes and bug fixes, therefore we need to “group” changes and be able to identify them. We have triage meetings where we decide what items to import to the new system.
In Microsfot TFS it would be possible to e.g. create a bug Work Item and link all relevant code changes to the Work Item and create a shelve. Then we could group all relevant changes and import them to our new system.
In this instance we do not have this luxury with SVN. So I guess the maintenance team of the previous system need to somehow “mark” or “tag” their commits to indicate that this commit fixes bug #1523, or something similar.
1) What is the best way to mark commits in SVN to indicate a link to a certain change in the system? (labels, tags, marks, etc.). 2) If we somehow mark code changes with reference to e.g. some bug, how do we easily query for all commits that relate to some mar? E.g. “give me all commits that have been marked with bug #1522”?
Thanks for your help!
The only way that I know of is the commit message. You can use your command-line grep-fu to search for the commits you want in the output of the
svn logcommand. Or you can write a utility which searches for the commits using the result ofsvn log --xml, or you can use your preferred SVN GUI client, which could have this utility built-in.For example, TortoiseSVN has a filter box in the log window that allows searching for commits containing a given text in their message. See the screenshot here.