[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rdiff
From: |
Paul Edwards |
Subject: |
Re: rdiff |
Date: |
Sun, 01 Jun 2003 11:17:05 GMT |
I have tested this patch and it works like a dream. I tried to
run the sanity.sh but it appeared to complain (although not in
so many words, I wasn't sure if it was an error or not) that I
need an "id" that knew about "-u" and "-n', which a "man id"
showed that my id supposedly did know about those
parameters. But after printing that error/non-error it appeared
to end, so I assume from that that it was an error and it didn't
like something about my "id" program.
So I hope it passes the sanity.sh.
BFN. Paul.
"Paul Edwards" <kerravon@nosppaam.w3.to> wrote in message
news:PdWBa.307$7E.3437@news-server.bigpond.net.au...
> "Paul Edwards" <kerravon@nosppaam.w3.to> wrote in message
> news:U6vBa.6053$ES.66814@news-server.bigpond.net.au...
> > "Derek Robert Price" <derek@ximbiot.com> wrote in message
> > news:mailman.7024.1054235988.21513.bug-cvs@gnu.org...
> > > Once I apply your changes to diff.c, I do see the improvements you
> > > mentioned, but I also start seeing failures in the death2 sanity tests.
> > > Specifically, death2-diff-3 starts reporting that it can't find a file
> > > that exists in the repository with two revisions specified rather than
> > > reporting that the file was removed.
> >
> > Ok, it sounds like more things are falling into that other bug that
> > I mentioned (reproduced below). In my opinion use_rev2 should
> > be NULL for that removed file, and thus detected as removed,
> > before hitting my code change.
> >
> > But I don't know how to get use_rev2 to be NULL. Any ideas?
>
> I'm going to test this patch out later. I saw code elsewhere
> that seemed to say things like if (use_rev2 or rev2-is-dead) so
> maybe that is the way to go.
>
> With a bit of luck this will fix both bugs I reported with diff.
>
> patch against cvs1-11-6.
>
> BFN. Paul.
>
>
> Index: diff.c
> ===================================================================
> RCS file: /cvs/ccvs/src/diff.c,v
> retrieving revision 1.94
> diff -c -r1.94 diff.c
> *** diff.c 23 Jan 2003 21:19:17 -0000 1.94
> --- diff.c 31 May 2003 04:24:36 -0000
> ***************
> *** 909,920 ****
> freevers_ts (&xvers);
> }
>
> ! if (use_rev1 == NULL)
> {
> /* The first revision does not exist. If EMPTY_FILES is
> true, treat this as an added file. Otherwise, warn
> about the missing tag. */
> ! if (use_rev2 == NULL)
> /* At least in the case where DIFF_REV1 and DIFF_REV2
> are both numeric, we should be returning some kind
> of error (see basicb-8a0 in testsuite). The symbolic
> --- 909,920 ----
> freevers_ts (&xvers);
> }
>
> ! if ((use_rev1 == NULL) || RCS_isdead (vers->srcfile, use_rev1))
> {
> /* The first revision does not exist. If EMPTY_FILES is
> true, treat this as an added file. Otherwise, warn
> about the missing tag. */
> ! if ((use_rev2 == NULL) || RCS_isdead (vers->srcfile, use_rev2))
> /* At least in the case where DIFF_REV1 and DIFF_REV2
> are both numeric, we should be returning some kind
> of error (see basicb-8a0 in testsuite). The symbolic
> ***************
> *** 931,937 ****
> return DIFF_ERROR;
> }
>
> ! if (use_rev2 == NULL)
> {
> /* The second revision does not exist. If EMPTY_FILES is
> true, treat this as a removed file. Otherwise warn
> --- 931,937 ----
> return DIFF_ERROR;
> }
>
> ! if ((use_rev2 == NULL) || RCS_isdead (vers->srcfile, use_rev2))
> {
> /* The second revision does not exist. If EMPTY_FILES is
> true, treat this as a removed file. Otherwise warn
> ***************
> *** 948,960 ****
> }
>
> /* now, see if we really need to do the diff */
> if (strcmp (use_rev1, use_rev2) == 0)
> return DIFF_SAME;
> - else
> - return DIFF_DIFFERENT;
> }
>
> ! if ((diff_rev1 || diff_date1) && use_rev1 == NULL)
> {
> /* The first revision does not exist, and no second revision
> was given. */
> --- 948,966 ----
> }
>
> /* now, see if we really need to do the diff */
> + /* if the version numbers are identical, we know
> + they are definitely the same, but otherwise we
> + need to continue to the full check */
> if (strcmp (use_rev1, use_rev2) == 0)
> return DIFF_SAME;
> }
>
> ! if ((diff_rev1 || diff_date1)
> ! && ((use_rev1 == NULL)
> ! || RCS_isdead (vers->srcfile, use_rev1)
> ! )
> ! && !(diff_rev2 || diff_date2)
> ! )
> {
> /* The first revision does not exist, and no second revision
> was given. */
> ***************
> *** 995,1004 ****
> /* now, see if we really need to do the diff */
> if (use_rev1 && use_rev2)
> {
> if (strcmp (use_rev1, use_rev2) == 0)
> return DIFF_SAME;
> - else
> - return DIFF_DIFFERENT;
> }
>
> if (use_rev1 == NULL
> --- 1001,1011 ----
> /* now, see if we really need to do the diff */
> if (use_rev1 && use_rev2)
> {
> + /* if the version numbers are identical, we know
> + they are definitely the same, but otherwise we
> + need to continue to the full check */
> if (strcmp (use_rev1, use_rev2) == 0)
> return DIFF_SAME;
> }
>
> if (use_rev1 == NULL
>
>
- Re: rdiff,
Paul Edwards <=
- Re: rdiff, Derek Robert Price, 2003/06/02
- Re: rdiff, Derek Robert Price, 2003/06/02
- Message not available
- Re: rdiff, Paul Edwards, 2003/06/03
- Re: rdiff, Derek Robert Price, 2003/06/03
- Re: rdiff, Larry Jones, 2003/06/03
- Message not available
- Re: rdiff, Paul Edwards, 2003/06/03
- Re: rdiff, Derek Robert Price, 2003/06/04
- Message not available
- Re: rdiff, Paul Edwards, 2003/06/04
- Re: rdiff, Derek Robert Price, 2003/06/05
- Message not available
- Re: rdiff, Paul Edwards, 2003/06/05