Archive for the ‘Project Management’ Category

Invaluable SVN properties for source files

September 2, 2010

If you add a source file to your repository, think about adding those SVN properties:


svn:eol-style = native
svn:mime-type = text/plain
svn:keywords = Date Revision HeadURL Author

The first line checks a file for consistent line endings before it can be commited.
The last line enables the magic tags like $Date: $ (see previous post).

You can also make TortoiseSVN auto-add properties by setting it up in the [auto-props] section of your SVN config file (%APPDATA%/Subversion/config). Here are some useful lines:


[auto-props]
*.cpp = svn:mime-type=text/plain;svn:eol-style=native
*.hpp = svn:mime-type=text/plain;svn:eol-style=native
*.h = svn:mime-type=text/plain;svn:eol-style=native
*.c = svn:mime-type=text/plain;svn:eol-style=native
*.dbc = svn:mime-type=text/plain;svn:eol-style=CRLF
*.doc = svn:needs-lock=true;svn:mime-type=application/msword

Advertisements

SVN Batch Update with TortoiseSVN

June 10, 2010

This one-liner within a .bat file will update all subversion copies in the directory of the .bat file:

for /d %%d in (*. ) do call c:\programme\tortoisesvn\bin\tortoiseproc /command:update /path:%%d /notempfile /closeonend:3

Controlling issue trackers from your version control system

May 27, 2010

I’ve been looking around for issue trackers and this is a short summary on how to control issues from commit comments.

Trac:
see #Nr – reference an issue (comment shows up in history of the ticket with that number)
fixes #Nr – automatically closes a “bug” ticket with that number
closes #Nr – automatically closes a “feature request” ticket with that number

Redmine:
for referencing issues: refs, references, IssueID
for fixing issues: fixes, closes
example: This commit refs #1, #2 and fixes #3

Mantis:
Has to be configured by a regular expression.
Could be issue, bug #id for referencing and fixes, closes #id etc. for fixing issues.

Some more notes on these systems:
Trac (current version 0.12) requires python with setuptools and Genshi, one DBMS (SQLite, PostgreSQL or MySQL) and the svn repository (one per Trac installation) has to exist on the same server as the Trac.
Redmine (current version 0.95, 1.0 coming soon) is based on Ruby on Rails, and works at least with mysql/pgsql/sqlite as DBMS. SVN binaries have to be installed on the machine running the redmine, but the SVN server can exist somewhere else.
Mantis (current version 1.3) is based on PHP and is proven to work with MySQL/PGsql/MS SQL or DB2, but not SQLite. The SVN server can reside on a different machine.
While Mantis and Trac SVN integration seems to work via a post-commit hook only, Redmine also allows to update SVN information periodically (e.g. cron-job) or on demand.