[Lxr-dev] [ lxr-Bugs-526664 ] CVS {default}=head != co default
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2012-01-25 18:04:57
|
Bugs item #526664, was opened at 2002-03-06 14:12 Message generated for change (Comment added) made by ajlittoz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=526664&group_id=27350 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SCM support Group: v0.9.1 >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Malcolm Box (mbox) Summary: CVS {default}=head != co default Initial Comment: 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... ---------------------------------------------------------------------- >Comment By: Andre-Littoz (ajlittoz) Date: 2012-01-25 10:04 Message: 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 ---------------------------------------------------------------------- Comment By: Kolja Waschk (kawk) Date: 2002-03-08 03:21 Message: 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; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-03-06 14:14 Message: Logged In: NO aah, two corrections. my correct e-mail is 'ka...@ma...', 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=526664&group_id=27350 |