tags:

views:

37

answers:

2

Right now, whenever I make a commit with svn, I use the -m option to input the log comment for a revision. However, I'm likely to forget things if I've been working on a revision for a long time. Is there a way to mark comments for a revision as I work on it so I don't have to type them when I commit?

+4  A: 

I just keep them in a file then use the --file <filename> arg instead of the -m option.

Stephen P
+3  A: 

I know this probably comes across more as bitching than answering the question, but I feel I need to expand on the comment...

It's usually not a great idea to make a single commit that contains lots and lots of changes, even if all those changes are described in the change message. If something needs to be reverted, merged, etc it's a lot easier to have smaller, more easily digested commits. Given that, the commit message should usually be just stuff that you can actually still remember when the commit is done.

And if unsure, a simple diff before commit usually refreshes my mind about what was changed, and sometimes tells me that it should be split into more than one commit as well.

calmh
It's still a valid point. I would like to say I want to avoid committing anything that has been tested, but the next response will be that I need to tighten my code/test/commit cycle. I'm using svn by myself and for the first time seriously, so I still have some things to learn.
Eugene M
@Eugene M: it is sometimes good to commit without testing things, or even commit broken things. A good practice is to work always in a branch, and merge code into main trunk line only after testing. It is much easier in DVCSes, but in SVN you can also replicate this workflow. Read http://softwarewhys.wordpress.com/2010/07/16/why-dvcs-provides-better-central-control/ for a nice example.
liori