开发者

Subversion - Tool/Utility/Software for forcing all commits to have a Change Request number?

Are there any kind of utilities/tools/software开发者_开发百科 to bolt onto Subversion that forces committers to commit against a Change Request number?

My company currently uses Starteam source control, which has numerous issues we believe would be rectified in SVN. However our business process insists that everything is committed using a CR#, so until we rectify this problem we cannot consider moving.

Ideally we'd need some sort of web site to create/monitor the CRs.

So does anything exist out there, or does everyone roll their own?


You'd probably want to set up some form of pre-commit hook to verify that the commit message includes a reference to a CR# (whatever form that may take).


Apart from using a pre-commit hook script on the server to reject all commits that don't have a CR# reference, you can also use special properties to help your users.

The docs for TortoiseSVN explain what properties to set and how they work. But many other svn clients use the same properties (e.g., Subclipse).


It sounds like what you might be looking for isn't a plugin for Subversion but a tool to manage your CRs. How are your CRs currently managed?

You could have a look at Trac, JIRA, Fogbugz etc for this requirement - this question may help find the right tool for you.

Once you have some CR tracking software, pre-commit hooks are definitely the way to go to limit check-ins. It should be easy (I believe there are examples that come with either SVN itself or Trac) to only allow a commit if it contains a ticket reference (e.g. 'fixes #42'). You could go one step further and actually check that the cited CR number exists and is in the right state etc - the hook is just a script, so you can really do anything with them.


As already mentioned, you'll need pre-commit hooks. You can create these very simply using a variety of languages. I've just documented the end to end process of doing this in .NET if it helps: http://www.troyhunt.com/2010/02/creating-subversion-pre-commit-hooks-in.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜