uzay95
uzay95

Reputation: 16622

How to change svn commit message

I wrote a script which can auto commit in every 10 minutes. But it's commit message always same ("Code saved"). But i want to change some of them which are milestone.

This is my auto commit script:

cd c:\inetpub\wwwroot\siteCodes
svn commit -m "Code Saved"

How can i write a script which can give me a chance to write revision number and new commit message.

Upvotes: 0

Views: 1278

Answers (2)

harpo
harpo

Reputation: 43158

To answer your actual question (at personal risk), svn requires explicit permission to be set in a hook script before it will allow the log message to be changed. I never have a repository long before I need this. Here's a batch file you can use. Put it in the repository's "hooks" folder and call it pre-revprop-change.bat

http://svn.haxx.se/users/archive-2006-03/0107.shtml

Or a little more readable version,

http://ayria.livejournal.com/33438.html

Of course, I agree with everyone else that your setup is very sub-optimal. But you'll inevitably need to change the log message for a good reason sooner or later. :)

Upvotes: 3

D'Arcy Rittich
D'Arcy Rittich

Reputation: 171351

This is a bad approach, you should not auto-commit. Source control should not be treated like a backup system.

Instead, commit when a logical chunk of work is completed. Always try to commit code in a state that will build properly. And then, you have the opportunity to type whatever commit message you want.

Upvotes: 8

Related Questions