info-cvs
[Top][All Lists]
Advanced

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

bug in diff/rdiff with HEAD?


From: Alvaro Martinez Echevarria
Subject: bug in diff/rdiff with HEAD?
Date: Tue, 4 Nov 2003 01:05:55 -0800 (PST)

I guess it wasn't a good idea to send my first post on a Friday
night :)... Sorry, but I have to try again, in case anyone knows
what's going on here... Is there any other list with cvs gurus
that might have a clue about this?

There's a bug in diff/rdiff with HEAD, or maybe I'm just going
crazy. The problem has to do with diffing between a given tag
(say FOO) and HEAD, when there are files (say blah/blah.c) that
appeared after FOO but were deleted before now (i.e., HEAD). I'm
not worried about branches at this point, so we can assume a
single linear trunk.

On one of the pservers I am using (cvs-1.11.1p1-8.7 on RH7.1),
both:

  cd blah; cvs diff -r FOO -r HEAD

and

  cvs -d :pserver:... rdiff -r FOO -r HEAD blah

result in a diff where blah/blah.c is created:

  Index: blah/blah.c
  ===================================================================
  RCS file: blah/blah.c
  diff -N blah/blah.c
  --- /dev/null   1 Jan 1970 00:00:00 -0000
  +++ blah/blah.c        20 Mar 2002 04:22:22
  -0000      1.9
  @@ -0,0 +1,1034 @@
  +
  + The whole file that shouldn't be here anyway
  + [...]

When I run into the same situation on both cvs versions
1.11.1p1debian-8.1 and 1.12.1-7 on Debian unstable, the result is
different. Now rdiff behaves correctly (i.e., no difference is shown
for that file), but diff still shows blah/blah.c as a created
file.

Setting aside the incongruent results above, and in my mind at
least, the correct behaviour would be for both diff and rdiff to
not show anything: since that file didn't exist in FOO, and it's
been deleted in HEAD, that's no difference. Otherwise, it's
impossible to get accurate diffs that show what has changed in a
repository from a tag to the present. By accurate I mean diffs
that can be applied with patch to a non-cvs file hierarchy to get
an exact copy of the HEAD of the trunk.

Am I doing anything wrong? Is this a known bug? Any advice?
Thanks,

--
Álvaro Martínez Echevarría    alvarom AT_BUT_NO_SPAM cisco.com
Cisco Systems
SJC24/3/A5-3
510 McCarthy Blvd.
Milpitas, CA 95035







reply via email to

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