[m-dev.] for review: add cvdr to tools.

Tyson Dowd trd at cs.mu.OZ.AU
Sat Jan 20 12:03:16 AEDT 2001


On 19-Jan-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:

> My version has several improvements on that.  Maybe I made those
> improvements after you copied the version in ~fjh/bin/scripts.
> 
> First, I pipe the output of `cvs log' through `sed'
> to delete the initial junk that is the same for every revision:
> 
>     instead of
> 	cvs -n log -N -r$branch.$N $options "$file"
>     use
> 	cvs -n log -N -r$branch.$N $options "$file" | sed '1,/^-------/d'
> 						    ^^^^^^^^^^^^^^^^^^^^^
> Second, when printing out the initial revision, my version
> also prints out the log message for it:
> 
>     add
> 	echo cvs log -N -r1.1 $options "$file"
> 	cvs log -N -r1.1 $options "$file" | sed '1,/^-------/d'
>     before
> 	cvs checkout -p -r1.1 ...
> 
> Third, the "/imp/" bit assumes that your repository name ends in "/imp".
> My version use $CVSROOT instead:
> 
>     instead of
> 	cvs checkout -p -r1.1 `sed "s^.*/imp/^^" CVS/Repository`/"$file" 2>&1
>     use
> 	cvs checkout -p -r1.1 `sed "s^$CVSROOT/^^" CVS/Repository`/"$file" 2>&1

Ok, I've made these changes.  The final line doesn't seem to do
anything, I guess previous versions of CVS left more cruft in the
CVS/Repository file.

I've also added a bit of code to handle the case where CVSROOT is
not set (often I don't set it unless I do a checkout).  In this case we
just don't run the sed command.

I'll commit this now.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list