[Top][All Lists]

[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: Thu, 23 Oct 2003 18:54:45 -0700 (PDT)

Theres' 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),

  cd blah; cvs diff -r FOO -r HEAD


  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

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 tags
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?

Álvaro Martínez Echevarría    alvarom AT_BUT_NO_SPAM
Cisco Systems
510 McCarthy Blvd.
Milpitas, CA 95035

reply via email to

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