Running Arbitrary Scripts Under CVS
Subject:   Using python script with verifymsg
Date:   2003-08-04 03:21:22
From:   anonymous2
I'm using python script to check log files.

It's supposed to ask whether user wants to write log again (if log is found incomplete).

How can I add such interactivity ?

All I get is:

Traceback (most recent call last):
File "/home_local/samiviit/CVS/script/", line 18, in ?
rerun = input('Haluatko tayttaa lokin uudelleen y/n? ')
EOFError: EOF when reading a line

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Using python script with verifymsg
    2003-08-04 15:00:58  anonymous2 [View]

    CVS doesn't expect you to use interaction in these scripts. There are several reasons the developers didn't include interaction, one of which is that some remote access methods just don't allow it. This is explained on page 163 of 'Essential CVS', and is also somewhere in 'info cvs' but I can't find it there right now.

    You may find that verifymsg is more useful to you when checking whether the user has written a proper log file entry. If you combine that with the 'ReReadLogAfterVerify' option in the CVSROOT/config file, your script can change the log message that CVS stores.

    If there is simply not enough information in the log file, you can refuse to allow the commit to proceed.
    • Using python script with verifymsg
      2003-08-05 01:57:13  anonymous2 [View]

      So I guess it's not possible to open editor and re-edit temp log message if original message has been noticed to be incomplete ?? Is this due to client/server model ??
      • Using python script with verifymsg
        2003-08-05 15:52:02  anonymous2 [View]

        It is possible - you are, after all, writing a separate program that could do just about anything.

        * Some client-server models don't allow such interaction.
        * You are adding arbitrary data to the socket CVS is using for its data, and could accidentally trigger some other CVS command.
        * You could generate a deadlock, as one person's commit can't proceed because it's waiting on another person doing their editing, but the other person is waiting on the first to do editing. This might or might not be a problem in a loginfo script, which runs after the commit is processed, but would be a problem in a verifymsg script.

        In addition, CVS doesn't re-read the log message after a loginfo script, so any changes you make are ignored. It can re-read the log message after a verifymsg script, however. (See my previous response.)

        Jenn Vesperman.