You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David James <ja...@cs.toronto.edu> on 2009/03/15 00:36:56 UTC

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)

On Sat, Mar 14, 2009 at 5:13 PM, Hyrum K. Wright
<hy...@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
<hy...@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


Re: 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)

Posted by Greg Stein <gs...@gmail.com>.
On Sun, Mar 15, 2009 at 01:36, David James <ja...@cs.toronto.edu> wrote:
>...
> 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?

Seems reasonable. If the list isn't included, then it would simply
commit... no harm, no foul. But if it *does* detect a list, then it
can look for a mismatch.

And the false-positive is no big deal: the user is simply asked a
question and can easily continue the operation. Non-interactive mode
would skip the check and question.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1340178