These instructions presumes a familiarity with Subversion conventions, commands and status codes.
Apache Subversion (SVN) 1.6.x.
Sakai client-side configuration file
Install the Sakai SVN config file on your local machine. This will help to ensure commit consistency amongst Sakai committers.
Copy the configuration file to
~/.subversion/config (Unix) or
Sakai uses Jira as its issue tracking system. Sign up for a Jira account at http://jira.sakaiproject.org/secure/Signup!default.jspa. After you create an account you will need to be added (at a minimum) to the Jira "sakai-dev" group in order to work with Jira tickets. Contact firstname.lastname@example.org for more information.
Before you can commit code to the Sakai SVN server, you must obtain commit access. You can request commit access by sending an email to email@example.com. Obtaining commit access is not automatic and requires for core committers, at a minimum, agreeing to the terms of the Sakai Contributor Licensing Agreement (CLA). Contact Mary Miles at firstname.lastname@example.org to obtain a copy of the CLA.
Fixes should be merged to stable maintenance branches only after they have been tested and verified locally by QA. Currently, fixes that are ready for merging are those that have been 1) closed and have a branch status set "to merge".
- Review Jira tickets that have been 1) closed and 2) have a branch status set "to merge". The ticket assignee is responsible for determining whether or not the fix should be applied to other Sakai versions (e.g., 2.5, 2.6). However, the branch manager should also consider the range of a fix and update the ticket's affects and fix versions appropriately or seek clarification from the assignee.
- Perform merge or apply patch.
- If merging, it is recommended that a dry run be performed first.
- If conflicts are encountered during the merge attempt contact ticket assignee and request that they resolve the conflict.
- If dry run is successful, perform merge.
- Run a mvn clean install before committing fix to ensure that the merge did not break the build.
- Commit fix. Avoid overly descriptive merge messages. -m "TICKET-number merge trunk r12345" is sufficient. Feel free to cross-reference other Jira tickets in the log message if appropriate.
- Update Jira ticket.
fix versionto upcoming release(s).
- Set maintenance branch status to "closed".
- Add short comment noting the branch merge and the merge revision number(s) (e.g., 2.7.x, r56789)
- If necessary, close issue.
- Repeat steps above if fix needs to be merged to other maintenance branches.
Merge changes (comparing revisions N to M) in a working copy (an explicit commit is required thereafter to apply the merge). If the working copy path is omitted a default value of ""."" is assumed. The
--change (-c) switch is equivalent to -r <M-1>:M.
Example (--change (-c))
Example (--revision (-r))
Example (reverse merge)
You can use
svn merge to undue a previous commit by specifying a reverse difference between changesets (e.g. -r70787:70784). After rolling back your working copy be sure to commit your changes.
Displays the difference between two revisions or paths. Useful for checking changes before final commit.
Useful for reviewing working copy commit history.
svn log will return all log messages in the current working copy if no arguments are supplied.
svn propset (editing a commit message)
If you need to change a commit message, you can issue an
svn propset with the
--revprop switch enabled to update the log message. If you issue the log revision from a working copy you can omit the path.
If you need to check all file and tree changes you have made to your working copy before committing changes use
svn status. You can also include a file path or specify the
-v option to review the current status of every item in your working copy.
Codes (partial listing)
'A' Item is scheduled for addition.
'C' The contents (as opposed to the properties) of the item conflict with updates received from the repository.
'D' Item is scheduled for deletion.
'L' Item is locked.
'M' Item has been modified.
'?' Item is not under version control.
'!' Item is missing (e.g., you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).
Apache Subversion home: http://subversion.apache.org/
SVN documentation: Version Control with Subversion (includes links to SVN 1.5 and 1.6 versions (nightly) of the online book): http://svnbook.red-bean.com/