[cvsnt] Re: Commitinfo script output line endings 0d 0d 0a

Oliver Koltermann okoltermann_deletethis_ at gmx.de
Thu Oct 6 09:55:21 BST 2005

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

Hello list,

Bo Berglund <bo.berglund at telia.com> writes:

> On 05 Oct 2005 11:03:52 +0200, Oliver Koltermann
> <okoltermann_deletethis_ at gmx.de> wrote:
> >1. Is there a convention that server side scripting in CVSNT has to
> >   give output with unix style line endings even on a Windows box?
> >
> >2. If so, can somebody help me in generating unix line endings in
> >   Python?
> You probably did not get a reply because noone could understand what
> you were asking about...

Thank you Bo for trying to clean this up! I hope I can explain my
problem more understandable now.

> Are you saying that your own called script does not do what you want
> then you should address this to the forum dealing with the particular
> language in which you have written the script.

No. The script is working fine if called directly on the server
command line with example arguments and data.

The script is used to check for some basic code formatting rules. It
simply opens the files named by the lines of stdin input and checks
their formatting. On wrong formatting it outputs an informative
message to stdout and exits with non-zero exit code.

> If on the other hand you are saying that the CVSNT supplied
> information *to* your script does not have the formatting you expect
> then this is the place, but you need to submit more clear examples.

I had to figure out the CVSNT supplied information because I use a
server version of 2.0.58d and the script calling conventions changed
in the past - you will know this from your own scripting and CVSMailer

This is also *not* my problem.

> For example exactly what is your cvommitinfo script doing, what is the
> input data and what is the output you are creating with the
> discrepancies you experience.
> Have you tested with a really simple script so you can check what is
> going on? What happened thta you thought strange?

The problem is the above mentioned error message my script produces to
inform the cvs user about what went wrong. It is a plain print command
in Python (similar to echo, I guess) outputting a line of text and a
following newline character.

When called on the servers command line the script produces a
Windows-Style line ending (0D 0A) which renders just as it is supposed
to be.

When called as commitinfo script from CVSNT the stdout output from the
script is forwarded to the client. Then the CVSNT client produces
wrong line endings (0D 0D 0A).

> In my own experience with loginfo, taginfo, notify and postcommand I
> have never had an issue with what CVSNT was sending me at all.

It's only a matter of definition. If somebody says to me "All script
output has to be Unix style" I'm happy. I will then have to find out
how to achieve this in Python, but this is another story. But I cannot
find this in the documentation.

Thanks again for your help!

O. Koltermann

More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook