#25 CVS tag diff feature does not work correctly

closed-works-for-me
nobody
None
5
2006-06-11
2005-06-23
Edwin Fine
No

I tagged a set of CVS files, and used the Create new
topic screen with a CVS repository and a start and end
tag. I kept getting an error message:

"Problem generating topic text:"

but no description of the problem.

It did work correctly when I selected the "Default to
HEAD" checkbox. Examination of the code in
lib/Codestriker/Repository/Cvs.pm showed the following:

my $extra_options = $default_to_head ? '-u' : '-f';

$extra_options is used in the rdiff command.
Examination of the rdiff command, plus some
experimentation, showed that providing the -f option in
addition to -r to CVS produces no output, leading to
the error message.

Example:

$ cvs -d
:pserver:codestriker:codestriker@cvssys:/cvs/repo rdiff
-u -f -r 1.0 -r review01 mymodule/myfile.cpp
$

As you can see, no output. Changing the above "-f" to
"-u" produced the expected output. However, I could get
no combination of "-f" and "-r" to work as expected.
maybe I misunderstood how this works, or I am using an
old CVS (1.11.2).

Changing the code to

my $extra_options = $default_to_head ? '-f' : '-u';

solved the problem. It's not clear if the problem is a
code issue or a misunderstanding on my part, though.

Discussion

  • David Sitsky
    David Sitsky
    2006-06-11

    Logged In: YES
    user_id=208928

    I suspect this is related to usage of an older CVS client,
    as nobody else has reported this problem. Just curious,
    what if you change your above command to:

    cvs -d
    :pserver:codestriker:codestriker@cvssys:/cvs/repo rdiff
    -f -u -r 1.0 -r review01 mymodule/myfile.cpp

    ie, change the order of the -f and -u arguments. Looking at
    the usage of the older 1.11 clients, it seemed to suggest
    this is the right way of presenting the flags.

    Does that make any difference for you?

    I've changed the order in the code too, as it looks like a
    harmless change anyway.

    Sorry for the long delay in getting back to you about this
    issue!

    Cheers,
    David

     
  • David Sitsky
    David Sitsky
    2006-06-11

    • status: open --> closed-works-for-me