[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Prevent accidental commits

From: Jeenu V <jeenuv_at_gmail.com>
Date: Thu, 12 Jun 2008 07:11:57 +0530

>> Right, "svn lock" is not applicable, and there are no client-side hooks.
>> The correct solution is probably to look at the output of "svn status" and "svn diff" and make sure that you really want to commit all shown differences. Only then should you run "svn commit".

Yeah, I could do that. But the catch is to remind myself to do it every time.

> In addition to "svn st" and "svn diff", I also suggest that you don't do the commit with the commit message already in the command line. Force it to open the editor. In the editor you can see the files that it will commit. You can not modify the file list in the editor, but if you see anything in there that you don't want to commit, you have the option of quitting the editor without making any changes. Which in turn gives you an option of aborting the commit.

I used to do it. I later abandoned this, ever since I started noticing
an empty line after the last line in my commit log -- which I didn't
want. I couldn't remove it by any means. It seemed like the SVN
removes whatever follows, and including the line "-- This line and
blah blah...."; but he CR/LF of the line above lingers.

I think what I might do is to define a shell alias for svn, and do
some sanitary checks.

Thanks guys, for your response.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-06-12 09:37:06 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.