#45 CVS {default}=head != co default

v0.9.1
closed-wont-fix
SCM support (7)
5
2012-01-25
2002-03-06
Anonymous
No

I tried lxr 0.91's ability to cross-reference directly from
CVS, specified v{default}=head in the config.

I expected lxr to build its cross-reference data based
on the same revision that one would get if he does a
simple 'cvs co' (without any revision or tag specified).

However this does not work as expected for a particular
project where we make use of a vendor branch. I
attached the head of one of the affected RCS files,
where:

"cvs co" would retrieve 1.1.1.2
lxr however indexes 1.1 as the head

lxr seems to internally translate the 'head' into '1.1'. If
there is some other way to specify "the revision that cvs
would checkout by default" then consider this report to
be just a "documentation bug report"; I'd like to know
what v{default} setting would make lxr behave as I
expect...

Discussion

  • Nobody/Anonymous

    Logged In: NO

    aah, two corrections. my correct e-mail is
    'kawk@mar.ixo.de', and it seems the file didn't get
    attached, so I include it here (hopefully it remains
    intelligible, sorry):

    head 1.1;
    branch 1.1.1;
    access;
    symbols
    as_of_2002_03_06:1.1.1.2
    as_of_2002_03_04:1.1.1.2
    as_of_2002_02_26:1.1.1.2
    as_of_2002_02_21:1.1.1.2
    as_of_2002_01_29:1.1.1.1
    ps:1.1.1;
    locks; strict;
    comment @ * @;
    expand @o@;

    1.1
    date 2002.02.26.13.50.33; author kawk; state Exp;
    branches
    1.1.1.1;
    next ;

    1.1.1.1
    date 2002.02.26.13.50.33; author kawk; state Exp;
    branches;
    next 1.1.1.2;

    1.1.1.2
    date 2002.02.26.14.02.20; author kawk; state Exp;
    branches;
    next ;

    desc
    @@

    1.1
    log
    @Initial revision
    @
    text
    @ /*
    SOURCE FILE: xyz.c

     
  • Kolja Waschk

    Kolja Waschk - 2002-03-08

    Logged In: YES
    user_id=478715

    The following patch fixed the issue for us. It considers the 'branch'
    info in the RCS header (just below 'head') and searches for the
    latest revision in the named branch, substituting it for 'head'. (Note:
    probably it would be wiser to make the result available as
    version='default' instead of 'head' to retain backwards compatibility)

    --- CVS.pm-orig Fri Mar 8 11:27:03 2002
    +++ CVS.pm Fri Mar 8 11:28:07 2002
    @@ -360,6 +360,17 @@
    /^@/s &&
    substr($_, 1, -1) || $_ }
    $v =~
    /(\w+)\s*((?:[^;@]+|@[^@]*@)*);/gs };
    }
    +
    + if(defined (my $k=$cvs{'header'}{'branch'}))
    + {
    + $k=~s/\./\\./g; # quote dots in branch number
    + $k=(grep(/^$k\.\d+$/, keys %{$cvs{'branch'}}))[0]; # get ANY
    revision on branch
    + if(defined $k)
    + {
    + while($cvs{'branch'}{$k}{'next'}) { $k =
    $cvs{'branch'}{$k}{'next'}; }
    + $cvs{'header'}{'symbols'}{'head'} = $k;
    + }
    + }

    $cvs{'desc'} = shift(@cvs) =~
    /\s*desc\s+((?:[^\n@]+|@[^@]*@)*)\n/s;
    $cvs{'desc'} =~ s/^@|@($|@)/$1/gs;

     
  • Malcolm Box

    Malcolm Box - 2002-05-09
    • assigned_to: nobody --> mbox
     
  • Andre-Littoz

    Andre-Littoz - 2012-01-25
    • status: open --> closed-wont-fix
     
  • Andre-Littoz

    Andre-Littoz - 2012-01-25

    I close this VERY old bug following resolution of bug #3434724 allowing to display any release on any branch. I didn't check if 'cvs co' is the same or not wether you specify 'head', but I feel it is no longer relevant since I implement an automatic --allversions discovery algorithm.

    To be release in 0.11

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks