info-cvs
[Top][All Lists]
Advanced

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

Re: How to avoid Garbage Value in the difference of the file


From: Russ Sherk
Subject: Re: How to avoid Garbage Value in the difference of the file
Date: Fri, 6 Jan 2006 10:54:30 -0500



On 1/5/06, ferozahmed <address@hidden> wrote:
Hi Russ

i am doing this beacause i want to store delta values in  the cvs repository is this the right way to store the delta values or there are some other means to store the delta values

CVS stores the deltas internally.  They are always accessible via the diff command. It seems (to me anyhow) redundant to store a hard copy of this information in a file that is istelf under revision control.  The reasoning behind this is:

- As your project grows, this file will become very very large
- The information in this file after the first dev cycle is complete will be largely useless (who cares that a bug was fixed in v1.1 when you are working on v5.8).  It is not so much that the info  is comletely useless, just that the clutter will overpower the pertinant information after a few cycles.
- Looking at a bunch of diff's will probably not be usefull to anyone.  I.e. it is hard to figure out what went on between revisions by looking at code snippets let alone fragmented code snippets.

That being said, unless there is some sort of customer requirement... don't store diffs.  It is better to store logs:
- We use a commitinfo script to capture commit logs and append them to a file.  One for each branch.
- This provides some useful information about what happened during a dev cycle (if your developers use commit messages...)

Or you can create a script to generate this information on demand (e.g. a script to show all differences between product versions V1.4 and V2.1 )

Or if you simply must do as you orriginally posted, use perl/sed/grep/whatever to re-format the diff output and play around with the different diff options (-u, -n)

Regards,

--Russ
Thanks & Regards

Feroz Ahmed
Member, IVV Group
#2989/1B, 12th Main
80 Feet Road, Indiranagar
BANGALORE - 560008 INDIA
Ph : +91-80-51267681/82
E-mail : address@hidden
www.oaksys.net

---------- Original Message ----------------------------------
From: Russ Sherk <address@hidden>
Date:  Thu, 5 Jan 2006 07:51:06 -0500

>The 'garbage' output is standard.  Diff is a CVS reporting tool.  If you
>want to have clean output, you'll have to filter it (e.g. pipe through grep,
>sed to strip unwanted lines.)
>
>Why are you doing this? I can see doing this for some sort of patch report
>but putting the output into cvs seems a little strange because you'll always
>be able to get the info from cvs by re-running the diff command.
>
>--Russ
>
>On 1/5/06, ferozahmed <address@hidden> wrote:
>>
>> Hi All
>>
>> My requirement is to fine the difference between two versions of the file
>> and checkin the difference into the repository when i tried to execu the
>> following command
>>
>> cvs diff -r1.1 -r1.4 text1
>> i am getting output as follows
>>
>> Index: text1
>> ===================================================================
>> RCS file: /usr/local/repository/repository/text1,v
>> retrieving revision 1.1
>> retrieving revision 1.4
>> diff -r1.1 -r1.4
>> 1,3c1,26
>> < in asdfjkl;lf
>> < sfjsdfj j p
>> < it's io am here ewe fi go
>> ---
>> > Index: /home/trainee/work/repository/text1
>> > ===================================================================
>> > RCS file: /usr/local/repository/repository/text1,v
>> > retrieving revision 1.3
>> > retrieving revision 1.1
>> > diff -u -r1.3 -r1.1
>> > --- /home/trainee/work/repository/text1       2 Jan 2006 05:29:54
>> -0000       1.3
>> > +++ /home/trainee/work/repository/text1       30 Dec 2005 07:21:06
>> -0000     1.1
>> > @@ -1,14 +1,3 @@
>> > -Index: text1
>> > -===================================================================
>> > -RCS file: /usr/local/repository/repository/text1,v
>> > -retrieving revision 1.2
>> > -retrieving revision 1.1
>> > -diff -u -r1.2 -r1.1
>> > ---- text1    2 Jan 2006 05:25:38 -0000       1.2
>> > -+++ text1    30 Dec 2005 07:21:06 -0000      1.1
>> > -@@ -1,5 +1,3 @@
>> > - in asdfjkl;lf
>> > - sfjsdfj j p
>> > - it's io am here ewe fi go
>> > --adding new lines to the files
>> > --of the text1
>> > +in asdfjkl;lf
>> > +sfjsdfj j p
>> > +it's io am here ewe fi go
>>
>>
>> this output contains the difference aswell the garbage value like
>> retriving revision information where as i am interested to just checkin
>> the difference of the file any solutions
>>
>>
>> Thanks & Regards
>>
>> Feroz Ahmed
>> Member, IVV Group
>> #2989/1B, 12th Main
>> 80 Feet Road, Indiranagar
>> BANGALORE - 560008 INDIA
>> Ph : +91-80-51267681/82
>> E-mail : address@hidden
>> www.oaksys.net
>>
>>
>>
>>
>> ________________________________________________________________
>> Sent via the WebMail system at oaksys.net
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Info-cvs mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/info-cvs
>>
>
>





________________________________________________________________
Sent via the WebMail system at oaksys.net






reply via email to

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