[Lxr-dev] [ lxr-Bugs-3286661 ] Selection of an SCM file randomly returns head v
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2011-04-14 17:47:01
|
Bugs item #3286661, was opened at 2011-04-14 19:45 Message generated for change (Settings changed) made by ajlittoz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3286661&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: current cvs Status: Open >Resolution: Fixed Priority: 7 Private: No Submitted By: Andre-Littoz (ajlittoz) Assigned to: Andre-Littoz (ajlittoz) Summary: Selection of an SCM file randomly returns head v Initial Comment: When SCM is activated (cvs, BK or GIT), selecting a file version randomly displays 'head' version though the SCM information is correctly parsed and stored. Versions are dynamically defined into variable 'v' as per example in lxr.conf through the use of $files->allreleases(LXR::Common::pathname) function call. Cause is in Common.pm sub httpinit: - arguments of the query request are checked and cleaned, notably 'v' and $HTTP->{'param'}->{'file'} - order is 'v' then 'file' which sets global variable $pathname. But, check for 'v' in clean_release calls varrange to garantee that the requested version exists otherwise 'v' is reset to vardefault. With SCM, varrange may be the above function call using $pathname as argument. At that time, it has not yet been correctly initialised. It may or not contain value from a previous script invocation. Anyway, the value is wrong and may reference an incorrect file for which the 'v' value may not exist and we revert to default value, usually 'head'. To correct, just reverse the order of the tests. ---------------------------------------------------------------------- >Comment By: Andre-Littoz (ajlittoz) Date: 2011-04-14 19:47 Message: Corrected in CVS ---------------------------------------------------------------------- Comment By: Andre-Littoz (ajlittoz) Date: 2011-04-14 19:47 Message: This has now been fixed in CVS. If you can install the new version and check that it solves your problem, then it would be very useful. Thanks for reporting this defect and helping to make LXR better. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3286661&group_id=27350 |