This document is copyright (C) 2004 by the various Scmbug contributors who wrote it. It is licensed under the GNU Free Documentation License.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in Appendix B.
Scmbug is free software, licensed under the GNU General Public License.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
No liability for the contents of this document can be accepted. Follow the instructions herein at your own risk.
The excellent Bugzilla Guide served as an example in preparation of this document. Content and structural document elements were reused from this guide. The LDP Author Guide also served as a good example.
Development of this system benefited from invaluable insight on SCM and bug-tracking issues, along with feedback, from John C. Quillan, Mark S. Reibert, Dave Swegen, the Bugzilla developers, and the Subversion developers.
This document uses the following conventions:
| Descriptions | Appearance | ||
|---|---|---|---|
| Warning |
| ||
| Hint |
| ||
| Note |
| ||
| Information requiring special attention |
| ||
| File or directory name | filename | ||
| Command to be typed | command | ||
| Application name | application | ||
| Normal user's prompt under bash shell | bash$ | ||
| Root user's prompt under bash shell | bash# | ||
| Environment variables | VARIABLE
| ||
| Term found in the glossary | cvs2cl | ||
| Code example |
|
This documentation is maintained in DocBook 4.2 SGML format.
Scmbug is a system that integrates software configuration management with bug-tracking. It is implemented in Perl and has been successfully deployed on UNIX-like and Windows systems. It is pronounced Skamm-bag.
Those who do not use a software configuration management (SCM) system do not maintain a history of modifications performed to their software. When bugs creep in their software, they do not have adequate information on how changes to source code came about.
SCM systems, or even simple source code version control systems, make sure that a record of all changes and enhancements to the software is maintained. They provide a method of creating, storing, and labeling software changes.
Those who do not use a bug-tracking system tend to rely on shared lists, email, spreadsheets and/or Post-It notes to monitor the status of defects. This procedure is usually error-prone and tends to cause those bugs judged least significant by developers to be dropped or ignored.
Integrated defect-tracking systems make sure that nothing gets swept under the carpet; they provide a method of creating, storing, arranging and processing defect reports and enhancement requests.
SCM systems maintain software changes. Bug-tracking systems maintain lists of software enhancements and defects. By examining a log of software changes, it is uncertain why the changes occurred. By examining a log of defect reports, it is uncertain what changed in software in response to the defects.
Integration of SCM with bug-tracking ties the reason why a feature/defect was developed/fixed with what software changes occurred in the SCM system to accomplish this.
The goals of Scmbug are:
To solve the integration problem once and for all.
Provide synchronous verification checks of SCM actions against the bug-tracking system.
Provide a flexible architecture that can be deployed across the public Internet with reasonable security. Permit integrating repositories hosted by multiple SCM systems in separate networks, against a single, publicly accessible bug-tracking system, for use with multiple mobile developers.
Define an SCM to bug-tracking integration interface and mechanism that will permit integration of any SCM system with any bug-tracking system.
Integrate most popular free SCM systems, such as CVS, Subversion, and Arch.
Integrate most popular free bug-tracking systems, such as Bugzilla and Mantis.
Scmbug is developed as a client/server solution. As shown in Figure 3-1, it consists of a set of SCM system hooks that capture standard SCM events, a generic mechanism of handling these events on the machine hosting an SCM repository, a server daemon onto which integration requests corresponding to these events are transported, a generic mechanism of handling these requests, and functionality that can process these requests per bug-tracking system.
When various SCM events occur, such as committing software changes or labeling a repository, they are captured using hooks installed by Scmbug. Before the event's activity is allowed to proceed, various verification checks are performed as described in Section 4.4. These checks are synchronous; when an error is detected, the event's activity is stopped.
Scmbug is not original work. Most of the integration features separating it from related systems were first conceived and implemented by John C. Quillan for CVS and Bugzilla. The distinguishing features of his work are the synchronous nature of the verification checks, and a VDD Generator tool similar to the one described in Section 7.2. His work was never publicly released. Scmbug attempts to continue a redesigned, clean-room implementation of that work, supporting a wider variety of SCM and bug-tracking systems.
Other systems that integrate SCM with bug-tracking are described below. Along with Quillan's work, these solutions are unsuitable for certain development environments.
SCM systems can integrate their actions with Bugzilla using the Bugzilla email gateway. Hook scripts installed in an SCM system can email the results of the system's actions to an email account configured to parse the email and process it accordingly. An example of such a configuration is available from Steve McIntyre's web page.
This approach is not synchronous. For example, if a user accidentally commits against the wrong bug number, or a bug against which he is not the owner, the SCM system will proceed with the commit action regardless, without giving the user the option to correct his actions. Additionally, if the email gateway is not active, the developer will not be immediately aware that integration failed.
Tony Garnock-Jones' CVSZilla integrates SCM events produced by CVS with Bugzilla. It also extends CVS to give rudimentary support to "change-sets", or "transactions".
CVSZilla does not support integration of events produced by any SCM system in a generic way. It modifies the Bugzilla schema and does not work with future versions of Bugzilla. Finally, it assumes that the TCP port used by MySQL is accessible from the machine hosting the CVS repository.
The last assumption does not always hold true, especially when a bug-tracking system is used to track development of mobile developers (laptop users), needing the flexibility to work both locally and remotely, on multiple projects, across different organizational units. Experience has shown that this is a common scenario in organizations with limited hardware, software, or labor resources, such as an academic environment.
For example, imagine integrating CVS actions from a repository hosted on a personal laptop with a Bugzilla instance that needs to be publicly accessible from the Internet. This same bug-tracking system is used for collaboration with other mobile developers of a different organization on a joint project hosted on a third machine. Integration over the public Internet is not possible without opening the MySQL database port Bugzilla uses. Opening this port is unnecessarily insecure, exposing access to other applications hosted on the same database system. The Scmbug daemon exposes the minimum required integration interface between an SCM system and a bug-tracking system.
Commercial products concentrate only on integrating a particular SCM system with a particular bug-tracking system, in a proprietary way. They do not attempt to define a public SCM to bug-tracking integration interface, and solve the integration problem once and for all.
Scmbug is an effort for defining an SCM to bug-tracking integration interface and mechanism that will permit integration of any SCM system with any bug-tracking system.
For every SCM event, multiple corresponding integration actions may be issued from the glue to the daemon. The list of possible integration actions is:
activity_verify: An activity_commit integration action will soon follow, and data collected from the corresponding SCM event must be verified first.
activity_commit: A software change has already been committed in the SCM system, and this event must be integrated with bug-tracking. This action usually follows an activity_verify integration action.
activity_tag: A software labeling operation is issued in the SCM system, and this event must be integrated with bug-tracking.
activity_get_vdd: A VDD will be produced by the VDD Generator.
activity_get_bugs: The information of a list of bugs is returned for processing by the Merger.
When a software change occurs in the SCM system, a log message may be manually supplied by a user to describe the change. Using an activity_commit integration request, this log message is automatically inserted in the bug-tracking system against the specified bug id. Additional changeset information are automatically detected, such as the branch name that hosted the change and the list of files affected by the changeset. This information complements the users original log message when added in the bug-tracker, as shown in Figure 4-1.
Figure 4-1. Example of Integrated Log Message.
Added a glossary, and a document conventions section, just like the Bugzilla Guide uses. Began linking names of systems/tools to the glossary, and using a url to their webpage there. This will unclutter the pdf version of the document from url links inlined with content. Branch: HEAD Affected files: --------------- 1.7 --> 1.8 Scmbug:system/doc/manual/about.sgml 1.7 --> 1.8 Scmbug:system/doc/manual/bugtracking-backends.sgml NONE --> 1.1 Scmbug:system/doc/manual/conventions.sgml NONE --> 1.1 Scmbug:system/doc/manual/glossary.sgml 1.12 --> 1.13 Scmbug:system/doc/manual/manual.sgml.in 1.8 --> 1.9 Scmbug:system/doc/manual/scm-frontends.sgml 1.9 --> 1.10 Scmbug:system/doc/manual/tools.sgml
When a tag or branch operation is issued in the SCM system, a name is used to describe this software labeling operation. Using an activity_tag integration request, this label is inserted in the list of possible versions of the product in the bug-tracking system.
Figure 4-2 shows an example applying a label in Subversion. The label name is autodetected and does not need to be specified in the log message.
When various SCM events occur, verification checks are performed before the SCM event is allowed to proceed. Some checks are performed by the glue on the client side, the machine the SCM repository resides. Other checks are performed on the server side, the machine hosting the Scmbug daemon.
SCM events will be integrated with bug-tracking only if the integration glue is enabled. This can be controlled in the glue configuration file using the enabled variable, as shown in Figure 4-3.
SCM tools may work considerably different between separate versions. For example, CVS changed during the 1.12.x series the format of command-line arguments supplied to integration hooks. Appropriate support is needed to handle their idiosynchracies. The SCM tool's version is detected at runtime, and interaction with the tool is handled accordingly.
One of the problems with some SCM systems is that they may unset the PATH variable (e.g. Subversion in 1.2.x). The list of paths to the tool's binaries must be supplied in the glue configuration file using the binary_paths variable, as shown in Figure 4-4. It is verified at runtime that each binary needed by an SCM tool is present in only one path from the list supplied, to avoid accidentally invoking the wrong version of the tool due to an incomplete installation of the SCM tool.
The log message supplied to the SCM system when committing a software change is verified to match a log template expected by Scmbug. Two regular expressions describe how the bug id and log comment will be identified. These are defined as part of the log_template policy variable as shown in Figure 4-5, through the variables log_bugid_regex and log_body_regex.
A way to split a list of multiple bug ids into separate ids is also described with a regular expression through the variable log_bugid_split_regex. This is needed in order to permit special characters to preceed a bug number. For example, instead of separating bug ids using a whitespace or comma, one may want to also prefix a bug id with a '#'. Bug-trackers may then autolinkify in their comments a bug id that is prefixed by a '#' (e.g. Bugzilla). An example log message accepted by these expressions is shown in Figure 4-6.
Figure 4-5. Regular expressions describing the bug id, the split of bug ids and the log message body.
log_template => {
# The log_bugid_regex is a regular expression that must
# set the unnamed variable $1 to the bug number, or list
# of bug numbers. It is checked for a match as: m/$regex/s
log_bugid_regex => 'bug\s*([\d|\s|,|#]*?):',
# The log_bugid_split_regex is a regular expression
# describing how a list of bug ids will be split in
# individual bug numbers. It is split as: /$regex/
log_bugid_split_regex => ',\s?#|\s?#|,|\s+',
# The log_body_regex is a regular expression that must set
# the unnamed variable $1 to the log comment. It is
# checked for a match as: m/$regex/s
log_body_regex => 'bug.*?:\s*(.*)'
},
This template can be customized when the Scmbug codebase is configured, prior to installation. The arguments --with-log-template-bugid-regex=<regular_expression>, --with-log-template-bugid-split-regex=<regular_expression>, and --with-log-template-body-regex=<regular_expression> can be passed to configure, shown in Figure 8-4.
The log message supplied to the SCM system when committing a software change is verified to include only distinct bug ids.
It is verified that the log message supplied to the SCM system system meets a configurable minimum log message size limit. This behavior is defined in the glue configuration file using the minimum_log_message_size policy variable, as shown in Figure 4-7.
It is verified that the names used in labeling operations, such as creation of tags or branches, match a configurable label naming convention. This behavior is defined in the glue configuration file using the label_name policy variable, as shown in Figure 4-8.
Figure 4-8. Label naming convention policy.
# Format of label names (tag or branch names) defined as
# regular expressions.
label_name => {
enabled => 1,
names => [
# Convention for official releases.
# For example:
# SCMBUG_RELEASE_0-2-7
'^.+?_RELEASE_[0-9]+-[0-9]+-[0-9]+$',
# Convention for development builds.
# For example:
# SCMBUG_BUILD_28_added_a_policies_mechanism
'^.+?_BUILD_[0-9]+_.+$',
# Convention for branches.
# For example:
# b_experimenting_with_policies_on_glue_side
'^b_.+$',
# Convention for private developer tags. Uses
# the developer's initials (either 2 or 3).
# For example:
# p_kpm_prior_to_bug353_stabilization_fixes
'^p_[a-zA-Z][a-zA-Z]?[a-zA-Z]_.+$'
]
}
Labels for official releases can correspond to versions of the software that will be made public to users, and are applied by release managers.
Developments builds can be helpful in development environments that produce weekly builds, as a checkpoint of a stable codebase. They are applied by release managers. They can also correspond to development milestones that will incorporate specific features, even though the codebase is not ready for an official release.
Branches can be created when maintaining a previous, already released, version of a software. For example, to correct critical bugs or apply security fixes. They are applied by release managers. They can also be created when a feature may require a considerable amount of time to implement while disrupting the main codebase drastically (e.g. a core API change). A branch is created, the feature is implemented, and when it is deemed stable it is merged in the main codebase.
Private developer tags are very similar to development builds. They can be applied directly by developers, instead of strictly release managers, and should be thought of as personal, developer milestones applied at stable points. The developers may be working on features of increased complexity, or features that will require a significant amount of time to complete. Incrementally applying private developer tags that match distinct progress steps can help a developer debug a regression in his implementation. As another example, assume a developer implements a feature using a specific algorithm. Later, software requirements change, and the developer is tasked to reimplement this feature using a different algorithm. The developer can first apply a private tag, and then reimplement the feature using the new algorithm. If it is later determined that the feature should revert back to using the original algorithm, the developer can retrieve the original implementation using the private developer tag he had applied. In a sense, private developer tags can be applied at a finer granularity than group development builds.
The log message supplied to the SCM system when committing a software change may be required to include at least one bug id. This is determined using the presence_of_bug_ids policy variable, as shown in Figure 4-9.
Figure 4-9. Presence of bug ids policy.
#
# Presence of bug ids. There are 3 options:
#
# - 'required'. A bug id must be specified during each
# activity. Activities without a bug id will not be permitted.
#
# - 'optional'. If a bug id is supplied, the activity will be
# integrated. If not the activity will be permitted to go
# through in the SCM system, but without bug-tracking
# integration.
#
# - 'none'. Never integrate activities regardless. This is
# different than flagging the glue inactive. The remaining
# policies are still enforced were applicable.
# (e.g. policy minimum_log_message_size).
#
# This policy is ALWAYS enabled
presence_of_bug_ids => {
value => 'required'
},
All integration requests must include the SCM username of the user issuing an integration request. This username must be mapped to the username of the user in the bug-tracking system. Bug-tracking systems that do not support SCM usernames are accomodated through a username mapping list defined in the daemon configuration file using the userlist variable. Three mapping mechanisms are available:
LDAP. An LDAP directory is accessed to map the SCM username, as one LDAP attribute, into the bug-tracking username defined by another LDAP attribute. This can be configured in the daemon configuration file using the mapping_ldap variable, as shown in Figure 4-10.
Figure 4-10. SCM to bug-tracking username mapping based on mapping_ldap.
# This is a mapping based on LDAP. ldap_scm_username_attribute
# defines the LDAP attribute that will be used to match the
# SCM username. The SCM username will be mapped into the
# bug-tracking username defined by
# ldap_bugtracking_username_attribute.
mapping_ldap => {
enabled => 0,
ldap_server => '127.0.0.1',
ldap_port => '389',
# A binddn (e.g. cn=default) that has access to read all
# attributes
ldap_binddn => 'replace_with_binddn',
# The password of the binddn that has access to read all
# attributes
ldap_binddn_password => 'replace_with_binddn_password',
# The BaseDN in which to search for the
# ldap_scm_username_attribute (e.g. "ou=People,o=Company")
ldap_basedn => 'replace_with_basedn',
# The name of the attribute containing the user's SCM
# username
ldap_scm_username_attribute => 'uid',
# The name of the attribute containing the user's
# bug-tracking username
ldap_bugtracking_username_attribute => 'mail',
# LDAP filter to AND with the ldap_scm_username_attribute
# for filtering the list of valid SCM users.
ldap_filter => ''
},
List of regular expressions. A list of regular expressions describe how the SCM username will be matched and how it will be transformed into a bug-tracking username using the mapping_regexes variable. This can be configured in the daemon configuration file as shown in Figure 4-11.
Figure 4-11. SCM to bug-tracking username mapping based on mapping_regexes.
# This is a mapping based on regular expressions. The first
# expression defines how the SCM username will be matched. The
# second defines how it will be transformed, and uses the
# unnamed variable $1 that was described by the first
# expression. The mapping is checked for a match as:
# m/$first_regex/
# and is applied as: s/$first_regex/$second_regex/
mapping_regexes => {
enabled => 0,
values => {
# This is an example of mapping a Windows Domain user
# from 'DOMAIN\user' to 'user@EMAIL_DOMAIN.com'
'^DOMAIN\\\\(\w+)$' => '$1\@EMAIL_DOMAIN.com',
# This is an example of mapping a UNIX user from
# 'example_user' to 'example_user@exampledomain.com'
'^(\w+)$' => '$1\@exampledomain.com'
}
},
Direct. A direct one-to-one mapping of an SCM username to a bug-tracking username using the mapping_values variable. This can be configured in the daemon configuration file as shown in Figure 4-12.
Figure 4-12. SCM to bug-tracking username mapping based on mapping_values.
# This is a one-to-one mapping of SCM usernames to bugtracking
# usernames. Mappings in this list override mappings from
# mapping_regexes.
mapping_values => {
enabled => 0,
values => {
'DOMAIN\\example_user' => 'example_user@DOMAIN.com',
'example_user2' => 'example_user2@exampledomain.com'
}
},
If the SCM username already matches the bug-tracking username, these mappings can be disabled in the daemon configuration file as shown in Figure 4-13. If any of these mappings are enabled, they are executed in the order presented here. Mappings based on mapping_ldap are appiled first. Mappings based on mapping_regexes are applied second and can override a mapping based on mapping_ldap. Mappings based on mapping_values are applied last and can override all other mappings.
Figure 4-13. Disabling SCM to bug-tracking username mappings.
mappings => {
# Enable SCM username translation. This flag must be
# turned on for any of the mappings that follow to apply.
enabled => 0,
The username verification is applied case sensitive. This can be configured in the daemon configuration file as shown in Figure 4-14. For example, Microsoft Active Directory tends to capitalize the first letter of each word in the email address. The email address returned does not match the email address reported by the bug-tracker in lowercase, and needs case_sensitive_username_verification to be disabled.
An activity_verify integration request must refer to bug ids filed against the SCM system's associated product name in the bug-tracking system. This behavior is optional and can be configured in the glue configuration file using the valid_product_name policy variable, as shown in Figure 4-15.
Figure 4-15. Valid product name policy.
# The bug against which an activity is issued must be filed
# against a valid product name.
valid_product_name => {
enabled => 1
},
Regardless of the configuration of the valid_product_name policy, the product name is required by other parts of the integration. For example, it is needed to detect labeling operations in Subversion, as shown in Figure 7-7, for Mail notification and for Autolinkification. It can be specified in the glue configuration file using the product_name_definition policy variable in two ways:
Manually defined. All SCM activity in the repository will be integrated against a single product name in the bug-tracker. This requires setting the product_name_definition policy's type to manual and providing a product name in value, as shown in Figure 4-16.
Figure 4-16. Manually defined product name.
# Product name definition. There are 2 options:
#
# - type is 'manual'. Each bug id supplied during commit
# messages must be filed against the product name
# specified in value.
#
# This policy is ALWAYS enabled
product_name_definition => {
type => 'manual',
value => 'TestProduct'
},
Automatically detected. Some organizations may follow a development model that permits multiple products to be hosted under the same SCM repository. For example, multiple product names in the bug-tracking system may correspond to multiple branches in the SCM system. Scmbug can autodetect the appropriate product name by consulting a list of regular expressions that describe how to match the product name in a path in a repository.
Figure 4-17 shows a configuration example that can autodetect from the repository structure of Figure 4-18 the list of product names in Figure 4-19. When a file from one of the directories shown in Figure 4-18 is commited, the appropriate product name shown in Figure 4-19 will be autodetected.
Figure 4-17. Automatically detected product name.
# Product name definition. There are 2 options:
#
# - type is 'auto'. The product name will be
# autodetected. Value must be a comma(,)-separated list of
# regular expressions. Each regular expression must set the
# unnamed variable $1 to the product name.
#
# This policy is ALWAYS enabled
product_name_definition => {
type => 'auto',
value => 'dir/prefix1/productMain_(.+?)/,dir2/(.+?)/,dir3/(?:trunk|tags|branches)/(.+?)/'
},
Figure 4-18. Repository structure with product names that can be automatically detected.
dir/prefix1/productMain_subproductA/trunk dir/prefix1/productMain_subproductA/tags dir/prefix1/productMain_subproductA/branches dir/prefix1/productMain_subproductB/trunk dir/prefix1/productMain_subproductB/tags dir/prefix1/productMain_subproductB/branches dir2/productA_3-1/trunk dir2/productA_3-1/tags dir2/productA_3-1/branches dir2/productB dir2/productB_multiuser dir3/trunk/productC dir3/tags/productC dir3/branches/productC
Figure 4-19. Automatically detected product names from Figure 4-18.
subproductA subproductB productA_3-1 productB productB_multiuser productC
Another example where multiple products may be required would be a contracting company maintaining all their contracts in the same SCM repository but using separate product names in the bug-tracking tool.
![]() | We must note that, from an SCM perspective, hosting multiple products that share a common codebase in the same SCM system may not be the ideal way to go. Organizations that follow this development model may want to consider developing their common codebase in it's own SCM repository, as a separate product. They can then import the common code as a vendor branch in multiple SCM repositories, each corresponding to a single product name they wish to publicly release. More information on vendor branches can be found in the CVS and Subversion manuals. |
It is verified that the SCM user issuing an activity_verify integration request is the owner or one of the owners of the bug against which subsequent integration requests will be issued. This behavior is optional and can be configured in the glue configuration file using the valid_bug_owner policy variable, as shown in Figure 4-20.
It is always verified that the SCM system supplied a username when generating activity. However, some SCM systems may not always supply an SCM username. One example is Subversion running an svnserve daemon granting anonymous access. The username of the SCM user under which activity should be generated can be optionally configured in the glue configuration file using the anonymous_scm_username policy variable, as shown in Figure 4-21.
Figure 4-21. Anonymous SCM username policy.
# All integration activity must originate from a specific SCM
# user. If the SCM system does not provide the SCM user
# information (e.g Subversion running an svnserve daemon with
# anonymous access), assume the activity originated from a
# specific SCM user
anonymous_scm_username => {
enabled => 0,
value => 'anonymous_scm_user'
},
It is verified that the bug against which an activity_verify integration request is issued must is in an open, active state in the bug-tracking system. This behavior is optional and can be configured in the glue configuration file using the open_bug_state policy variable, as shown in Figure 4-22.
An email can be sent when an integration activity, either commiting or labeling, is accepted. This is defined in the glue configuration file using the mail_on_success policy variable, as shown in Figure 4-23. Emails can also be sent after a failed commit activity if the SCM system overshadows and does not report the error message using the mail_on_failure policy variable.
![]() | For example, Subversion does not report error messages of its post-commit hook. |
Figure 4-23. Mail notification policy.
#
# Send email notifications after integration activity
#
mail_notification => {
# Send an email after a successful activity (both
# verifying and labeling)
mail_on_success => 0,
# Send an email after a failed commit activity that the
# SCM system may overshadow and not report
# (e.g. Subversion does not report error messages of its
# post-commit hook.) .
mail_on_failure => 1,
mail_settings => {
# Must be a valid email address. Can remain empty if
# other users should be notified.
To => 'replace_with_commit_mailing_list_email@exampledomain.com',
# Must be a valid email address. Can remain empty if
# mail_also_appears_from_scm_user is enabled.
From => 'Scmbug <replace_with_mailing_list_owner_email@exampledomain.com>',
# Defaults to localhost if left empty
Smtp => 'replace_with_mail_server.exampledomain.com'
},
# Sending email when a tag is moved or deleted in CVS can
# be annoying, since multiple emails are sent per
# directory (but not when a tag is added). mail_on_label
# can disable that behavior.
mail_on_label => 1,
mail_recipients => {
# Make the email also appear to have been sent by the
# SCM user.
mail_also_appears_from_scm_user => 1,
# List of users that will be notified
mail_scm_user => 1,
mail_bug_owner => 1,
mail_bug_reporter => 1,
mail_bug_monitors => 1,
mail_product_owners => 1
}
}
It is possible to automatically change the resolution status of a bug at the time a software change is committed. It is verified that the requested resolution status is a valid resolution state in the bug-tracker and that the requested change does not violate the workflow of the bug-tracker. For example, changing a bug resolution in Bugzilla from REOPENED to UNCONFIRMED is an invalid status change.
Changing resolution status is accomplished if a resolution template expected by Scmbug is identified in the log message. The resolution does not need to apply to the same bug the software change is applied against. It could be applied to a different bug, multiple bugs, or multiple different resolutions could be applied to multiple different bugs. The resolution template must be specified on a separate line on its own and is completely removed before the log message is identified.
Four regular expressions describe how the bug id, the new status, the status resolution, and the status resolution data will be identified. These are defined as part of the resolution_template policy variable as shown in Figure 4-24, through the variables resolution_bugid_regex, resolution_status_regex, resolution_status_resolution_regex, and resolution_status_resolution_data_regex.
A way to split a list of multiple bug ids into separate ids is also described with a regular expression through the variable resolution_bugid_split_regex. An example log message accepted by these expressions is shown in Figure 4-26.
Figure 4-24. Regular expressions describing the bug id, the split of bug ids and the resolution status.
# Resolution template.
#
# Regular expressions that describe how a resolution status
# for a list of bug ids can be identified
resolution_template => {
enabled => 1,
# The resolution_bugid_regex is a regular expression that
# must set the unnamed variable $1 to the bug number, or
# list of bug numbers. It is checked for a match as:
# m/$regex/s
resolution_bugid_regex => 'status\s*([\d|\s|,|#]*?):',
# The resolution_bugid_split_regex is a regular expression
# describing how a list of bug ids will be split in
# individual bug numbers. It is split as: /$regex/
resolution_bugid_split_regex => ',\s?#|\s?#|,|\s+',
# The resolution_status_regex is a regular expression that
# must set the unnamed variable $1 to the requested
# status. It is checked for a match as: m/$regex/s
#
# For example, if one issued in the log message the
# resolution command:
#
# status 547: reopened
#
# Then the resolution_status_regex is expected to match
# "reopened"
resolution_status_regex => 'status.*?:\s*(\S+)\s*.*',
# The resolution_status_resolution_regex is a regular
# expression that must set the unnamed variable $1 to the
# requested resolution. It is checked for a match as:
# m/$regex/s
#
# For example, if one issued in the log message the
# resolution command:
#
# status 547: resolved fixed
#
# Then the resolution_status_resolution_regex is expected
# to match "fixed"
resolution_status_resolution_regex => 'status.*?:\s*\S+\s+(\S+)'
# The resolution_status_resolution_data_regex is a regular
# expression that must set the unnamed variable $1 to the
# additional data supplied by the resolution status. It is
# checked for a match as:
# m/$regex/s
#
# For example, if one issued in the log message the
# resolution command:
#
# status 548: resolved duplicate 547
#
# Then the resolution_status_resolution_data_regex is
# expected to match "547"
resolution_status_resolution_data_regex => 'status.*?:\s*\S+\s+\S+\s+(\S+)',
},
Some bug-trackers may report resolution-related information with a token that contains spaces. For example, Mantis 1.0.0 offers the resolution "unable to reproduce". This would make it difficult to develop regular expressions that will correctly identify the new status and resolution. This resolution could instead be written in a log message by the user as "unable_to_reproduce" and have Scmbug configured to replace all underscores ("_") with spaces (" ") using the resolution_status_convert policy, as shown in Figure 4-25.
Figure 4-25. Regular expressions defining a resolution status character conversion.
# The resolution_status_* information can have all of the
# following characters converted according to a regular
# expression. This is useful in addressing the limitation
# of some bug-trackers that report a resolution-related
# information with a token that contains spaces. For
# example:
#
# "unable to reproduce" in Mantis.
resolution_template => {
resolution_status_convert => {
enabled => 0,
# Regular expressions that will be applied to convert
# the characters of all resolution_status_*
# information. It is applied for substitution as:
#
# s/$convert_from/$convert_to/g
resolution_status_convert_from => '_',
resolution_status_convert_to => ' '
},
}
This template can be customized when the Scmbug codebase is configured, prior to installation. The arguments --with-resolution-template-bugid-regex=<regular_expression>, --with-resolution-template-bugid-split-regex=<regular_expression>, --with-resolution-template-status-regex=<regular_expression>, --with-resolution-template-status-resolution-regex=<regular_expression>, --with-resolution-template-status-resolution-data-regex=<regular_expression>, --with-resolution-template-status-convert-from-regex=<regular_expression>, and --with-resolution-template-status-convert-to-regex=<regular_expression> can be passed to configure, shown in Figure 8-4.
Figure 4-26. Example log message that changes the resolution status of multiple bugs.
status 548,622: reopened status 755: resolved worksforme bug 547:Implemented automatic status resolution as a new policy. This seems to work but will need improvements in the testsuite. status 547: REsolved fIXED status 548: RESOLVED duplicate 547 status 647: assigned unassigned@mkgnu.net
The resolution status and resolution descriptions are verified case insensitive by default, as shown in Figure 4-26. This can be controlled using the resolution_status_case_sensitive_verification variable, as shown in Figure 4-27.
Figure 4-27. Case sensitive resolution verification variable.
# Apply a case sensitive resolution and resolution status verification
resolution_status_case_sensitive_verification => 0,
A resolution description must refer to bug ids filed against the SCM system's associated product name in the bug-tracking system. This behavior is optional and can be configured in the glue configuration file using the resolution_valid_product_name policy variable, as shown in Figure 4-28.
Figure 4-28. Valid product name policy in reference to bug resolution.
resolution_template => {
# The bugs whose resolution status will be changed must be
# filed against a valid product name.
resolution_valid_product_name => 1,
},
The SCM user issuing a bug resolution must be the owner of the bug against which subsequent integration requests will be issued. This behavior is optional and can be configured in the glue configuration file using the resolution_valid_bug_owner policy variable, as shown in Figure 4-29.
CVS is the Concurrent Versions System, the dominant open-source network-transparent version control system.
Scmbug supports verification checks, integration of log messages with the bug-tracking system, and integration of labeling operations for CVS. Various deficiencies of CVS introduce complications in integration. It is recommended that users of CVS upgrade to Subversion.
CVS does not require users to enter a log comment when directories are added in a repository. Scmbug does not overcome this limitation, even though it is possible to do so.
Another limitation of CVS is that it does not provide an integration hook on 'cvs admin -o'.
The verification hook of CVS 1.11.x does not provide the list of files that will be modified. As a result, the Valid product name policy cannot be set to auto for CVS 1.11.x. This policy will be implemented in the future for CVS 1.12.x and, if possible, for CVSNT.
The temporary log message file of CVS 1.11.x reports the directory in which a change is applied. However it does not report separately the repository path. As a result, the Mail notification policy reports the changeset directory only. This will be implemented in the future for CVS 1.12.x and CVSNT.
A common limitation of other systems integrating CVS with bug-tracking resulted from the inadequate mechanism CVS 1.11.x uses to provide the list of affected files in a commit trigger. For each file, the old version, new version, and the filename, all separated by commas, can be passed as command-line arguments to an integration trigger script. When the filenames, or the directory in which the files reside, contain either commas or whitespaces, a processing script using a single regular expression to parse these arguments will get confused. Some systems addressed this by requiring source modifications to the CVS binary, and distributed patches for it. Scmbug addresses this issue by employing a stateful parser. Using this parser, the probability of files and directories with whitespaces or commas contained in their names to confuse the integration glue is marginal. For example, the filename shown in Figure 5-1 is accepted.
Figure 5-1. A complex filename accepted by the CVS glue.
a file with spaces,NONEs, commas, digits,1.1,2.numbers close to dots.1.2,NONe.txt
The verification hook for CVS does not provide the list of filenames that will be commited, hence it is impossible to dynamically detect the product name. Automatically detected product names are not supported for CVS.
Scmbug has been verified to work against the following releases of CVS:
1.11.21
1.12.13
CVSNT 2.5.03 Build 2260
Git is a distributed source code management tool designed to handle massive projects such as the Linux kernel with speed and efficiency.
Scmbug currently supports only verification checks for Git. It seems that Git's hooks need to be extended to support the activity_commit for integration of log messages with the bug-tracking system, and activity_tag for integration of labeling operations.
The verification hook for Git does not provide the list of filenames that will be commited, hence it is impossible to dynamically detect the product name. Automatically detected product names are not supported for Git.
Scmbug has been verified to work against the following releases of Git:
1.5.1.3
Subversion is a compelling replacement for CVS.
Scmbug supports verification checks, integration of log messages with the bug-tracking system, and integration of labeling operations for Subversion.
Subversion is not yet capable of using a predefined log template when the user's editor is opened to enter a log comment. As a result, the log template expected by Scmbug must be entered by the user.
Scmbug has been verified to work against the following releases of Subversion:
1.0.6
1.1.3
1.2.3
1.3.0
1.4.0
Additional SCM frontends can be supported by Scmbug. Developers and system integrators of the following SCM systems are strongly encouraged to contribute an SCM integration frontend:
Developing a frontend requires:
Committing to support this frontend in future releases of Scmbug.
Creating a new frontend module named src/lib/product/Glue/FrontendName.pm.in. The CVS frontend src/lib/product/Glue/CVS.pm.in serves as a good example.
Updating src/lib/product/Glue/Glue.pm.in:check_configuration accordingly.
Updating the configuration management files configure.in and Makefile.in to autogenerate, and autocleanup the new frontend.
Updating the install-tools rule of Makefile.in to install the new frontend from source.
Creating a new directory named src/glue/templates/frontendname that includes template hook/trigger scripts. The CVS trigger scripts in src/glue/templates/cvs serve as a good example.
Updating src/glue/templates/cvs/*/checkoutlist.in to always extract lib/scmbug/Scmbug/Glue/FrontendName.pm so the CVS SCM frontend does not break.
Updating the Glue Installer src/scripts/install_glue.pl.in and its manpage doc/manpages/install_glue.sgml.1.in to support the new frontend.
Updating the VDD Generator src/scripts/vdd_generator.pl.in and its manpage doc/manpages/vdd_generator.sgml.1.in to support the new frontend.
Updating the Merger src/scripts/merge.pl.in and its manpage doc/manpages/merge.sgml.1.in to support the new frontend.
Updating the documentation in doc/manual/content to reflect support for the new frontend.
Bugzilla is an enterprise-class piece of software that tracks millions of bugs and issues for hundreds of organizations around the world.
Bugzilla does not provide a public interface for SCM integration. Nevertheless, the Scmbug daemon attempts to reuse functionality already available in the Perl-based Bugzilla libraries. As a result, the source code used to host a Bugzilla instance must be locally accessible by the daemon. The installation_directory variable is used to define the location of the Bugzilla source installation as shown in Figure 6-1.
Figure 6-1. Bug-tracker installation directory for Bugzilla.
# Used for Bugzilla and RequestTracker. # # Path to the directory of the bugtracker sources providing an # API that the daemon can use installation_directory => '/usr/share/bugzilla/lib'
Additionally, the installed_locally variable is used to flag whether Bugzilla is installed locally on the same machine the daemon is running as shown in Figure 6-2. This is required to flush Bugzilla's version cache when SCM tags are added or deleted, and immediately reflect tag manipulation to Bugzilla's user interface.
Figure 6-2. Bug-tracker installed locally variable.
# Used only for Bugzilla. # # Flags whether the live bugtracker instance is installed # locally on the same machine the daemon is running installed_locally => 1,
![]() | For example, it is possible to install Bugzilla in machine A, and install a duplicate Bugzilla source in machine B where Scmbug is installed. In this scenario installation_directory would be set to Bugzilla's source code path on machine B, but the variable installed_locally would be set to 0. |
The Bugzilla developers are planning to provide a formal SCM integration interface in future releases.
As of version 2.22.0, Bugzilla does not yet support a mapping of the SCM username to a Bugzilla username. An SCM to bug-tracking username mapping is accomodated by the integration daemon using the userlist variable, as described in Section 4.4.8.
Bugzilla currently lacks a per-bug comment id. This makes it very difficult to accurately report the comment ids in a VDD for Bugzilla. Currently, the VDD comment ids are prefixed with the string "inaccurate_".
Scmbug has been verified to work against the following releases of Bugzilla:
2.14.2
2.16.5
2.18rc2
2.19.2
2.20.1
2.22.0
3.0.0
Mantis is a web based PHP/MySQL-based bugtracking system.
Mantis does not provide a public interface for SCM integration. However, the Scmbug daemon includes a native Perl-based bug-tracking backend for integration with Mantis. Configuration of the variables installation_directory(Figure 6-1) and installed_locally(Figure 6-2) is not required.
Mantis supports installation with multiple database backends. The daemon configuration variable database_vendor defines the selected database backend, as shown in Figure 6-3.
Figure 6-3. Database vendor variable.
# Valid values are the ones accepted by the Perl DBI. # # For Bugzilla, this value is ignored # # For Mantis, *some* valid values (there are others) are: # - 'mysql' # - 'Pg' database_vendor => 'mysql',
The Mantis developers are planning to provide a formal SCM integration interface in future releases.
As of version 0.19.0, Mantis does not yet support a mapping of the SCM username to a Mantis username. An SCM to bug-tracking username mapping is accomodated by the integration daemon using the userlist variable, as described in Section 4.4.8.
Scmbug has been verified to work against the following releases of Mantis:
0.19.0
1.0.0rc3
1.1.0rc1
Request Tracker is a web based request tracking system written in object-oriented Perl.
Request Tracker provides a public interface for SCM integration. The Scmbug daemon reuses functionality already available in the Perl-based Request Tracker libraries. As a result, the library code used to host a Request Tracker instance must be locally accessible by the daemon. The installation_directory variable is used to define the location of the Request Tracker installation as shown in Figure 6-4.
Figure 6-4. Bug-tracker installation directory for Request Tracker.
# Used for Bugzilla and RequestTracker. # # Path to the directory of the bugtracker sources providing an # API that the daemon can use installation_directory => '/usr/share/request-tracker3.4/lib'
This backend integration with Request Tracker assumes the product names in glue.conf match the queue names set in the Request Tracker.
The activity_tag integration action is not yet supported.
The Request Tracker backend does not currently support the VDD Generator and Merger.
As of version 3.4.5, Request Tracker does not require a mapping of the SCM username to a Request Tracker username. The username mappings can be disabled as shown in Figure 4-13.
Scmbug has been verified to work against the following releases of Request Tracker:
3.4.5
3.6.1
Test Director is a test and fault tracking system.
Test Director is based on MS Windows and hence the interfaces into the system are available on MS Windows only. Users have to run the Scmbug daemon on a Windows machine.
In order to use Test Director as your fault tracking system you will need to ensure that you install:
The Perl OLE package.
Test Director Mercury Quality Center System Test Remote Agent Add-in (Available from the Test Director Help-> Add-ins menu).
For Test Director, some example configuration settings for the daemon configuration file /etc/scmbug/daemon.conf are shown in Figure 6-5.
Figure 6-5. Example daemon configuration settings for Test Director.
# The URL connection string to Test Director. database_location => 'http://emea-testdir:8080/qcbin', # The database vendor is the same as the Domain within Test Director, # This must match the value that you would use on manual login. database_vendor => 'Domain', # The database name is the same as the Project within Test Director. database_name => 'Project', # The user name is the Test Director user login. database_username => 'username', # The password for the Test Director login. database_password => 'password',
Test Director and its fields can be further customized in the file /etc/scmbug/TestDirector.conf. This file must be updated to match your system.
The Test Director backend does not currently support the VDD Generator.
As of version 9.0.0, Test Director does not yet support a mapping of the SCM username to a Test Director username. An SCM to bug-tracking username mapping is accomodated by the integration daemon using the userlist variable, as described in Section 4.4.8.
![]() | Due to a bug in Windows ActiveState Perl, the backend would crash if a Win32::OLE object was called from a forked process (the forked daemon connection handler). For this reason the Test Director backend calls are all executed from a seperate script and the results are read back in. This does not limit the functionality, but it does mean that sub-processes are created. |
Scmbug has been verified to work against the following releases of Test Director:
9.0.0 (Quality Center), 9.2
Additional bug-tracking backends can be supported by Scmbug. Developers and system integrators of the following bug-tracking systems are strongly encouraged to contribute a bug-tracking integration backend:
Developing a backend requires:
Committing to support this backend in future releases of Scmbug.
Creating a new backend module named src/lib/product/Daemon/BackendName.pm.in. The Bugzilla backend src/lib/product/Daemon/Bugzilla.pm.in serves as a good example.
Updating src/lib/product/Daemon/Daemon.pm.in:read_configuration accordingly.
Updating the configuration management files configure.in and Makefile.in to autogenerate, and autocleanup the new backend.
Updating the install-server rule of Makefile.in to install the new backend from source.
Updating the documentation in doc/manual/content to reflect support for the new backend.
The command scmbug_install_glue is used to install the integration glue in an SCM repository. Existing hooks used in the SCM system are not overwritten.
The --binary-paths configuration option should be set to a list of paths that include all binaries needed by the integration tools and the SCM system. This includes the tools diff, xsltproc, docbook2pdf, docbook2html and the SCM system's binaries. The --bug configuration option should be set to the id of a bug in the bug-tracker against which the integration glue installation will be documented.
![]() | It is preferable to set in --binary-paths the path to the directory that contains a binary, instead of the path to the binary itself. Using Subversion in Windows for example, the binaries require additional libraries (e.g. .dll files) that are contained in the directory that holds the binary. |
An example installing the glue in a Subversion repository under UNIX is shown in Figure 7-1.
Figure 7-1. Glue Installation in a Subversion repository under UNIX.
$ scmbug_install_glue --scm=Subversion --product=TestProduct \
--repository=file:///tmp/testrepository --bug=770 --binary-paths=/bin,/usr/bin \
--daemon=127.0.0.1
This is the installation script of the Scmbug glue.
The glue will be installed in repository: file:///tmp/testrepository.
This is a repository for the Subversion SCM tool.
The product name in the bug tracking system is TestProduct.
The integration glue will be committed against bug 770.
The IP address of the Scmbug integration daemon to contact is 127.0.0.1.
The binary paths used are: /bin,/usr/bin
-------------
Press Enter to continue or Ctrl-C to cancel
Glue processing has been prepared in /tmp/Scmbug.30670
Installing part1
Check everything there before I commit or hit Ctrl-C to exit
Glue processing has been prepared in /tmp/Scmbug.30670
Installing part2
Check everything there before I commit or hit Ctrl-C to exit
![]() | Under Windows, the paths supplied to the installer should have directories separated with a forward (/) slash. Figure 7-2 shows an example running the installer under Windows. |
Integration glue can be installed in both local and remote CVS repositories.
After installation, the file <CVS_REPOSITORY_PATH>/CVSROOT/etc/scmbug/glue.conf holds the configuration of the glue.
![]() | CVSNT integration has only been verified to work with a :pserver: configuration. A CVSROOT starting with :local: does not work. This is because of the presumptious way CVSNT handles the CVSROOT variable. Apparently for some configurations it expands it to include the configuration type. The integration hooks use this expanded variable and as a result are pointed to incorrect paths. |
![]() | CVSNT uses the two variables Name and Root when configuring a repository, instead of only the CVSROOT variable. When hooks execute, CVSNT sets CVSROOT to be equal to Name. By default, CVSNT sets Name omitting the drive letter. The hooks will not execute if Name is not set to the full path of the repository since $CVSROOT will be referring to a path that does not exist. An example invalid Name/Root configuration is shown in Figure 7-3. An example valid Name/Root configuration is shown in Figure 7-4. Setting Name to be equal to Root produces the warning shown in Figure 7-5. The compatibility problems seem to refer to some clients simply not parsing a CVSROOT with a drive letter in it. If your development environment includes UNIX clients, and problems do occur, one alternative is to let Name lack a drive letter and manually edit the hook files to include the full repository path. |
A major drawback of CVS is it's lack of atomic transactions. As a side-effect, when the same log message is used to commit files in two separate directories, two integration activities are issued using the same log message. Duplicate log messages are then entered in the bug-tracking system. Scmbug solves this problem by using the commitinfo and loginfo hooks to detect commits in separate directories and consolidate the log messages entered in the bug-tracking system as one log message (one integration activity). This behavior is optional and can be configured in the glue configuration file using the consolidate_cvs_messages variable, as shown in Figure 7-6. However, ActiveState ActivePerl does not yet implement the getppid() function. Windows systems running Scmbug need to disable consolidate_cvs_messages.
Figure 7-6. Configuration option that consolidates CVS messages.
# This applies only to CVS. When a commit affects more than
# one directory, multiple duplicate log comments are inserted,
# one-per-directory. Enabling this option would consolidate
# the commits to all use the first log message.
consolidate_cvs_messages => 1
Subversion repositories do not support installation of the integration glue remotely. Local repository access is required.
After installation, the file <SVN_REPOSITORY_PATH>/hooks/etc/scmbug/glue.conf holds the configuration of the glue.
Subversion does not distinguish between commit activities and creation of tags or branches. It recommends that the user manually creates top-level directories named /trunk, /tags and /branches. When it's time to create a tag or branch, Subversion proposes following the convention of creating a copy of the main trunk using 'svn copy' in the /tags or /branches directories. As a result, the glue must manually detect if an activity_verify issued by Subversion also implies an activity_tag. To do so, it checks for addition of new subdirectories in the directories /tags or /branches. This behavior is defined in the glue configuration file using the label_directories variable, as shown in Figure 7-7.
Figure 7-7. Defining the Subversion labeling directories.
# This applies only to Subversion. It is recommended that tags # are stored in the 'tags' directory, and branches in the # 'branches' directory. label_directories => [ 'tags', 'branches' ]
Similarly, Subversion does not distinguish between the main development line and other branches. The glue must manually detect if a changeset is committed under /trunk. This behavior is defined in the glue configuration file using the main_trunk_directories variable, as shown in Figure 7-8.
Figure 7-8. Defining the Subversion main trunk directories.
# This applies only to Subversion. It is recommended that the # main trunk work is stored in the 'trunk' directory. main_trunk_directories => [ 'trunk' ]
![]() | It is not mandatory that trunk, tags, and branches are created in the root of the repository. A more flexible directory structure can be defined using the product_name_definition variable as shown in Figure 4-17. |
Since SCM changes are integrated with bug-tracking, it is possible to produce a list of changes that occured for a particular version of a software at a level that's higher than source changes.
ChangeLog information derived strictly from the SCM system, such as a report produced using the cvs2cl tool for CVS or using 'svn log' in Subversion, is overly detailed. It describes software changesets at a lower level, which interests mostly developers. It is of little value to a user simply interested in a summary of added features. Moreover, when multiple changesets are committed in response to a defect, such a document becomes lengthy. It takes considerable time to follow the history of changes and decipher if, or how, a defect was corrected.
Instead, a VDD reports at a higher level a summary of the features/defects worked on and why, using information recorded in the bug-tracking system. It provides additional useful information such as resolution status, bug owner, severity, and priority. It also reports what changes occured at a lower level in the SCM system per bug, effectively superseding ChangeLog documents produced strictly from the SCM system. Without integration of SCM with bug-tracking, this level of detail in a release document would not be possible.
Given two SCM label names (tag or branch names), this tool
queries the SCM system for the dates the labels were applied. It
then queries the bug-tracking system to produce a report of the
bugs worked between that date range. A VDD can additionally
reflect decisions of the development team which are not
documented in the SCM logs, such as choosing to not add a
feature, resolving it as WONTFIX. It may also
display bugs that were added in the period between releases but
not worked yet, alerting users of newly discovered defects.
A VDD can be generated using the command scmbug_vdd_generator. An example producing this document is shown in Figure 7-9.
Figure 7-9. Generating a Version Description Document.
$ scmbug_vdd_generator --scm=Subversion --product=TestProduct \
--repository=file:///tmp/testrepository --from=tags/SCMBUG_RELEASE_0-8-1 \
--to=tags/SCMBUG_RELEASE_0-8-2
The output of this tool is a collection of files. An XML file is produced that contains the result of the VDD query. This file is also transformed using XSLT into a Docbook 4.2 SGML file. Finally, this SGML file is processed using Docbook tools to produce PDF and HTML output.
There are plans to provide a tool that will merge the work done on a list of bugs into a given label.
Work done on bugs can be merged in a label using the command scmbug_merge. Two merging capabilities are available:
Merging bug changes in a codebase based on an existing tag, and applying a new tag: The user supplies a --base-label option which specifies the label (usually a tag) against which the changes in the specified list of bug ids should be applied. A temporary branch is created based on this label, and the bug changes are applied on this branch. The resulting codebase is label with the name specified by --target-label, and the temporary branch is deleted.
An example merging bug changes in a codebase based on an existing tag is shown in Figure 7-10.
Merging bug changes directly in an existing branch:The user supplies a --base-label option which specifies the label (usually a branch or the main development line) against which the changes in the specified list of bug ids should be applied. The changes are applied directly in this label. No --target-label option is supplied.
An example merging bug changes directly in an existing branch is shown in Figure 7-11.
Scmbug is available for UNIX and Windows systems. It is expected to work with Perl version 5.6.1 or later and has been confirmed to work with Perl version 5.8.4. Dependencies on additional programs are described in Section 8.2.
The project's webpage contains the most up to date information on the project, including the latest release and manual. A users mailing list is available for subscription, or simply for sending email. The project's bug-tracking system contains the latest TODO list. Source code access to developers is available using anonymous CVS as shown in Figure 8-1 or through ViewCVS.
Under UNIX, Scmbug is available in the form of Debian and RPM packages. The provided packages are:
scmbug-common: common libraries.
scmbug-doc: documentation.
scmbug-tools: tools that can install the integration glue in an SCM repository and enhance the experience of integrating SCM with bug-tracking.
scmbug-server: the integration daemon.
![]() | If you believe your system meets the package dependencies, but installing packages fails due to missing dependencies, installation of the packages is still possible. Installation of RPM packages can be forced as shown in Figure 8-2, and installation of Debian packages can be forced as shown in Figure 8-3. |
Under Windows, the entire Scmbug system is available in the form of a single .zip file. It must be manually installed in C:/Program Files/Scmbug. It requires ActiveState ActivePerl installed in C:/Perl/bin/perl, and a temporary directory called C:/Temp.
Source code distributions are also available. Figure 8-4 shows how the system can be configured and installed from source. It is possible to choose a different destination of the libraries and binaries of Scmbug both in UNIX and Windows systems at configuration time. It is also possible to build the system without documentation. If you are configuring from source code, running './configure --help' can provide more information.
Figure 8-4. Installation of the system from source.
bash$ ./configure
bash$ make
bash$ su
bash# make install-common
bash# make install-doc
bash# make install-tools
bash# make install-server
![]() | Installing all these packages will NOT automatically integrate an SCM repository with a bug-tracking system. It will only install the basic software needed to do so. A user must configure the Integration Daemon and start it as shown in < |