MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0008168 | CMake | CTest | public | 2008-11-25 10:42 | 2009-02-25 14:59 |
|
Reporter | simonh | |
Assigned To | Brad King | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake-2-6 | |
Target Version | | Fixed in Version | | |
|
Summary | 0008168: CTest retrieval of file versioning history has logic errors |
Description | Source/CTest/cmCTestUpdateHandler.cxx has various logic errors and inconsistencies.
From CMake-2.6.2:
Line 707: I think the logic is reversed here - modifiedOrConflict should be true if any of these characters are present or indeed 'U'. At least, logging information should be retrieved if "svn update" changes a file - returns "U filename".
Line 726: svn log can cope with "log -r M:N" whether M >= N or N =< M. svn status shouldn't really be needed (perhaps only if svn_latest_revision discovery failed).
Line 758: This boolean is set outside this context (line 445, 493, 560, 581, ...) and by any previous loop evaluation at line 749. The condition should be nested within if(modifiedOrConflict)
|
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | duplicate of | 0008128 | closed | Brad King | CMake | ctest cannot handle SVN usernames with spaces | related to | 0010484 | closed | Brad King | CMake | There is no way to run svn/git/hg with custom options like --username. | child of | 0007541 | new | | CDash | support modern version-control tools |
|
Attached Files | ctest-versioninfo.patch (27,283) 2008-11-25 10:46 https://public.kitware.com/Bug/file/1867/ctest-versioninfo.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2008-11-25 10:42 | simonh | New Issue | |
2008-11-25 10:44 | simonh | Note Added: 0014178 | |
2008-11-25 10:46 | simonh | File Added: ctest-versioninfo.patch | |
2008-11-25 10:49 | simonh | Note Added: 0014179 | |
2009-02-12 12:12 | Bill Hoffman | Status | new => assigned |
2009-02-12 12:12 | Bill Hoffman | Assigned To | => Brad King |
2009-02-13 16:30 | Brad King | Relationship added | duplicate of 0008128 |
2009-02-13 16:37 | Brad King | Note Added: 0014934 | |
2009-02-16 10:03 | Brad King | Note Added: 0014944 | |
2009-02-25 14:58 | Brad King | Relationship added | child of 0007541 |
2009-02-25 14:59 | Brad King | Note Added: 0015390 | |
2009-02-25 14:59 | Brad King | Status | assigned => closed |
2009-02-25 14:59 | Brad King | Resolution | open => fixed |
2011-01-17 15:58 | Brad King | Relationship added | related to 0010484 |
Notes |
|
(0014178)
|
simonh
|
2008-11-25 10:44
|
|
This is related to 0008128 insofar as svn status can be called by condition at line 726 and the output is no always parsed correctly if users can have spaces in names. |
|
|
(0014179)
|
simonh
|
2008-11-25 10:49
|
|
I've attached a patch which addresses the following:
1) Use "svn status --xml" and parse output using another cmXMLParser derived class
2) modifiedOrConflict is set whenever the "mod" char is M,C,G or U
3) the logcommand is run when modifiedOrConflict is true and only in this branch is the (res) boolean tested and version info logged. |
|
|
(0014934)
|
Brad King
|
2009-02-13 16:37
|
|
The original author of the update code no longer works with us, so I've been working to understand the code too. As I said in issue 0008128 I've been refactoring this code. I'll work your patch into the refactored version.
I'm pretty sure that modifiedOrConflict is just a misnamed variable. The logic makes sense if the variable were named notModifiedOrConflict...it only gets the svn log for a file if it was not listed by svn due to local modification. |
|
|
(0014944)
|
Brad King
|
2009-02-16 10:03
|
|
I've committed the spelling and 'res' variable logic fixes. This includes renaming modifiedOrConflict to notLocallyModified for clarity.
STYLE: Fix spelling in cmCTestUpdateHandler
/cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v <-- Source/CTest/cmCTestUpdateHandler.cxx
new revision: 1.52; previous revision: 1.51
BUG: Fix svn update logic for modified files
/cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v <-- Source/CTest/cmCTestUpdateHandler.cxx
new revision: 1.53; previous revision: 1.52
I've rebased the rest of my refactoring on these changes but it isn't yet ready for commit. |
|
|
(0015390)
|
Brad King
|
2009-02-25 14:59
|
|
I've committed a whole new SVN updates implementation as part of the VCS refactoring in issue 0007541. I also updated the CTest.UpdateSVN test to put a space in the author name. |
|