info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: editing files via a commitinfo script?


From: Shubhabrata Sengupta
Subject: Re: editing files via a commitinfo script?
Date: Fri, 5 Oct 2001 14:04:14 +0530

You don't have to do that - the commitinfo script always has access to the
file in its "raw" form before it is checked in. In fact commitinfo script
would be run from the same directory as the "raw" file resides. You can just
see the "ls" output from your commitinfo script and see the output.

However I donot think that it is a good idea to run a beautifier through a
commitinfo script since then what the developer wanted to checkin is not the
same as what actually got checked in after getting munged by the beautifier.
It is better to run a "style checker" as a part of the commitinfo which
prevents a checkin if a particular source file does not conform to your
projects beautifaction standards. Then the developers would have to run the
beautifier on the code themselves before checking it in.

My 2 cents

Shubho

-----Original Message-----
From: Justin Dubs <address@hidden>
Newsgroups: gnu.cvs.help
To: address@hidden <address@hidden>
Date: Friday, October 05, 2001 1:58 PM
Subject: editing files via a commitinfo script?


>Several developers are using a c++ code repository hosted on an OpenBSD 2.9
>box.  We'd like to have a script automatically run on commits that would
run
>a code beautifier on whatever code we submit.  This way if we later update
>we will have nice pretty code.  :-).
>
>The probem I am having is that I can't figure out how to hook this script
>into cvs.  Commitinfo in CVSROOT will let a script run on commits, but the
>file i want to edit doesn't exist on the server, just the cvs version of
the
>file.
>
>How can I make a script run on commits, server-side if possible, that would
>actually have access to the raw text of the C++ file being commited and
>could in fact modify it before the commit actually happens?
>
>Or, will I have to dive into the cvs code and implement this "feature"
>myself? :-).
>
>Thanks a lot guys,
>
>Justin Dubs
>
>
>_______________________________________________
>Info-cvs mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/info-cvs
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]