info-cvs
[Top][All Lists]
Advanced

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

Re: Help, can't use the %-5d option in CVS diff command.


From: vse fischer
Subject: Re: Help, can't use the %-5d option in CVS diff command.
Date: Tue, 25 Jan 2005 01:21:47 -0800 (PST)

Larry,

At this moment I tried the diff command line as
follows (in a DOS-box):

  cvs diff -l -r V0_0_0 -r V0_0_1 \
    --old-line-format="---%c'\040'%dn%c'\040'%L" \
    --new-line-format="+++%c'\040'%dn%c'\040'%L" \
   
--unchanged-line-format="%c'\040'%c'\040'%c'\040'%c'\040'%dn%c'\040'%L"
\
   
--old-group-format="======%c'\012'%df%(f=l?:,%dl)d%dE%c'\012'%<"
\
   
--new-group-format="======%c'\012'%dea%dF%(F=L?:,%dL)%c'\012'%>"
\
   
--changed-group-format="======%c'\012'%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)%c'\012'%<###%c'\012'%>"
\
    --unchanged-group-format="" \
    test.txt >_diff_out

But the following command leads to an error (some %d
options are changed into %-5d, as written in the
help):

  cvs diff -l -r V0_0_0 -r V0_0_1 \
    --old-line-format="---%c'\040'%-5dn%c'\040'%L" \
    --new-line-format="+++%c'\040'%-5dn%c'\040'%L" \
   
--unchanged-line-format="%c'\040'%c'\040'%c'\040'%c'\040'%-4dn%c'\040'%L"
\
   
--old-group-format="======%c'\012'%df%(f=l?:,%dl)d%dE%c'\012'%<"
\
   
--new-group-format="======%c'\012'%dea%dF%(F=L?:,%dL)%c'\012'%>"
\
   
--changed-group-format="======%c'\012'%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)%c'\012'%<###%c'\012'%>"
\
    --unchanged-group-format="" \
    test.txt >_diff_out

I want to use these options to generate an output file
which looks something as follows:

  Index: test.txt
 
=======================================================
 RCS file:
F:/Ontwikkeling/Software/CodeBase/Test\units\DiffTest/test.txt,v
  diff [display used options]
      test.txt V0_0_0 revision 1.1
           test.txt V0_0_1 revision 1.2
  ==============
        12   12 | To for the test here are some
testlines:
        13   13 | This is testline 1.
  ---   14      | This is testline 2.
  ---   15      | This is testline 3.
        16   14 | This is testline 4.
        17   15 | This is testline 5.
  ==============
        17   15 | This is testline 5.
        18   16 | This is testline 6.
  ---   19      | This is testline 7.
  ---   20      | This is testline 8.
  **************
  +++        17 | This is testline 7, the line is
changed!
  +++        18 | This is testline 8, the line is
changed!
        21   19 | This is testline 9.
        22   20 | This is testline 10.
  ==============
        21   19 | This is testline 9.
        22   20 | This is testline 10.
  +++        21 | This line is added.
  +++        22 | This line is also added!
        23   23 | End this is the end of the message.
        24   24 |
==================================================

Or generate the output as follows:

  Index: test.txt
 
=======================================================
 RCS file:
F:/Ontwikkeling/Software/CodeBase/Test\units\DiffTest/test.txt,v
  diff [display used options]
      test.txt V0_0_0 revision 1.1
           test.txt V0_0_1 revision 1.2
  ==============
        12   12 | To for the test here are some
testlines:
        13   13 | This is testline 1.
  ---   14      | This is testline 2.
  ---   15      | This is testline 3.
        16   14 | This is testline 4.
        17   15 | This is testline 5.
  ==============
        17   15 | This is testline 5.
        18   16 | This is testline 6.
  ***   19   17 | This is testline 7.                                   | This 
is
testline 7, the line is changed!
  ***   20   18 | This is testline 8.                                   | This 
is
testline 8, the line is changed!
        21   19 | This is testline 9.
        22   20 | This is testline 10.
  ==============
        21   19 | This is testline 9.
        22   20 | This is testline 10.
  +++        21 | This line is added.
  +++        22 | This line is also added!
        23   23 | End this is the end of the message.
        24   24 |
==================================================

Remarks:
- Use a %5d option to print line number as "   21"
i.s.o. "21". This is helpfull to lineout large
sourcefiles.
- Show line numbers of both files seperate from each
other and on changes combined.

I hope you can halp me further, solving my problem.

Regards,
Robert Fischer.

--- Larry Jones <address@hidden> wrote:

> vse fischer writes:
> >
> > MIME-Version: 1.0
> > Content-Type: multipart/alternative;
> boundary="0-1709973163-1106312379=:50386"
> 
> Please do not send MIME and/or HTML encrypted
> messages to the list.
> Plain text only, PLEASE!
> 
> > I want to use the line/group format specifier to
> generate a difference
> > report with a user specified output format, but
> the %-5d format
> > specifier doesn't work.
> 
> "Doesn't work" is a bit nebulous.  Can you give a
> complete example
> showing the command you used, the result you got,
> and an explanation of
> how that differs from what you expected?
> 
> -Larry Jones
> 
> I'm writing you a message in code.  How do you spell
> "nincompoop"? -- Calvin
> 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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