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

Detect when changes in log message don't match commit? (was -- Re: svn commit: r36569 - in branches/1.6.x: . subversion/bindings/ctypes-python/csvn)

From: David James <james_at_cs.toronto.edu>
Date: Sat, 14 Mar 2009 17:36:56 -0700

On Sat, Mar 14, 2009 at 5:13 PM, Hyrum K. Wright
<hyrum_wright_at_mail.utexas.edu> wrote:
> This looks like a bit more than just a nomination.  :)
>
> On Mar 14, 2009, at 7:09 PM, David James wrote:
>
>> Author: djames
>> Date: Sat Mar 14 17:09:51 2009
>> New Revision: 36569
>>
>> Log:
>> * STATUS: Nominate and vote for r36559
>>
>> Modified:
>>  branches/1.6.x/   (props changed)
>>  branches/1.6.x/CHANGES   (props changed)
>>  branches/1.6.x/STATUS
>>  branches/1.6.x/subversion/bindings/ctypes-python/csvn/repos.py
>>
>> Merged:
>>  /trunk:r36559
>>  /branches/1.6.x:r36559

On Sat, Mar 14, 2009 at 5:13 PM, Hyrum K. Wright
<hyrum_wright_at_mail.utexas.edu> wrote:
> This looks like a bit more than just a nomination. :)

Yes it does :) Fixed in 36570.

There's a little bit of a UI weirdness here in the command-line client
that has bit me a few times.

$ svn commit STATUS
Sending STATUS
svn: Commit failed (details follow):
svn: File or directory 'STATUS' is out of date; try updating
svn: resource out of date; try updating
svn: Your commit message was left in a temporary file:
svn: '.../1.6.x/svn-commit.tmp'
$ svn up
G STATUS
Updated to revision 36568.
$ svn commit -F svn-commit.tmp
Sending .
Sending CHANGES
Sending STATUS
Sending subversion/bindings/ctypes-python/csvn/repos.py
Transmitting file data ..

In this case, I mistyped the second command, forgetting to specify
that the commit should only work on STATUS. Subversion could detect
this type of error pretty easily by looking at the automatically
generated list of changes in the log message (under "--This line, and
those below, will be ignored--").

What do you think of adding a prompt like this? (Similar to Perforce,
but not as automatic.)

$ svn commit -F svn-commit.tmp
List of changes in log message does not match changes in commit.
(a)bort, (c)ontinue:

In this case, since I mistyped the second command, I would abort, and
then retry with a command like this:

$ svn commit STATUS -F svn-commit.tmp
Sending STATUS
Transmitting file data ..

This type of logic would only help if the user included a list of
changes in the commit (e.g. they did not delete the list of changes
before committing.)

Thoughts?

David

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1323980
Received on 2009-03-15 08:54:27 CET

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

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