History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CC-322
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jeffrey Fredrick
Reporter: David Farrugia
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
CruiseControl

Fails to find Surround SCM modifications if a field is empty

Created: 16/Sep/05 02:12 AM   Updated: 06/Oct/05 01:32 AM
Component/s: Core Application
Affects Version/s: 2.3
Fix Version/s: 2.3.1

Original Estimate: 1 hour Remaining Estimate: 1 hour Time Spent: Unknown
Environment: Windows 2000, Surround SCM 4.0.1, CruiseControl 2.3.0.1


 Description  « Hide
Modifications in SurroundSCM files aren't picked up if there is no comment against them. This seems to be because the string parsing of the command "sscm cc" is failing when it comes across an empty field.

Looking at the source (net.sourceforge.cruisecontrol.sourcecontrols.SSCM) I think this can be fixed by replacing

if (iRight > iLeft) {

with

if (iRight >= iLeft) {

Although I wouldn't know what effect on calling code there would be of returning empty string ("") fields.

Will deal myself if you think appropriate.

David

 All   Comments   Work Log   Change History      Sort Order:
Jeffrey Fredrick [16/Sep/05 03:24 PM]
by "deal" you mean you'll submit a patch? :)

if you can submit a sample of the output with and without comments then someone else could write the unit test and make the patch.

David Farrugia [21/Sep/05 04:04 AM]
OK below as requested:

WITH NO COMMENT:

2005-09-14 16:22:40,606 [Thread-6119] INFO Project - Project fileconverter: checking for modifications
2005-09-14 16:22:40,606 [Thread-6119] DEBUG CurrentBuildStatusListener - updating status to modificationset for project fileconverter
2005-09-14 16:22:40,606 [Thread-6119] DEBUG Project - Project fileconverter: getting changes since last successful build
2005-09-14 16:22:40,606 [Thread-6119] DEBUG SSCM -
sscm cc / -bPROJECTS_Integration -pPROJECTS/PROJECTS/COMPONENTS/fileconverter -r -ydavidfa:sash1m1 -zminas:4900 -d20050914134348:20050914162240

2005-09-14 16:22:41,528 [Thread-6119] DEBUG SSCM - Output-<PROJECTS/PROJECTS/COMPONENTS/fileconverter><project.xml><12><Check in><20050914143346><><Farrugia, David><david@biomedcentral.com>-

2005-09-14 16:22:41,528 [Thread-6119] DEBUG SSCM - Invalid output; skipping this entry
2005-09-14 16:22:41,528 [Thread-6119] DEBUG SSCM - Output--

2005-09-14 16:22:41,528 [Thread-6119] DEBUG ModificationSet - Last modification: 01/01/1970 01:00:00
2005-09-14 16:22:41,528 [Thread-6119] DEBUG ModificationSet - Last modification: 01/01/1970 01:00:00
2005-09-14 16:22:41,528 [Thread-6119] INFO Project - Project fileconverter: No modifications found, build not necessary.
2005-09-14 16:22:41,528 [Thread-6119] INFO Project - Project fileconverter: idle
2005-09-14 16:22:41,528 [Thread-6119] DEBUG CurrentBuildStatusListener - updating status to idle for project fileconverter
2005-09-14 16:22:41,544 [Thread-6119] DEBUG Project - Project fileconverter: build finished

WITH A COMMENT:

2005-09-21 11:32:31,565 [Thread-6 ] INFO Project - Project fileconverter: checking for modifications
2005-09-21 11:32:31,565 [Thread-6 ] DEBUG CurrentBuildStatusListener - updating status to modificationset for project fileconverter
2005-09-21 11:32:31,565 [Thread-6 ] DEBUG Project - Project fileconverter: getting changes since last successful build
2005-09-21 11:32:31,565 [Thread-6 ] DEBUG SSCM -
sscm cc / -bPROJECTS_Integration -pPROJECTS/PROJECTS/COMPONENTS/fileconverter -r -ydavidfa:sash1m1 -zminas:4900 -d20050914134348:20050921113231

2005-09-21 11:32:32,533 [Thread-6 ] DEBUG SSCM - Output-<PROJECTS/PROJECTS/COMPONENTS/fileconverter><project.xml><14><Check in><20050921112613><test comment><Farrugia, David><david@biomedcentral.com>-

2005-09-21 11:32:32,565 [Thread-6 ] DEBUG SSCM - Output--

2005-09-21 11:32:32,565 [Thread-6 ] INFO ModificationSet - 1 modification has been detected.
2005-09-21 11:32:32,565 [Thread-6 ] DEBUG Modification - Last Modified: 09/21/2005 11:26:13
2005-09-21 11:32:32,565 [Thread-6 ] DEBUG Modification - UserName: Farrugia, David
2005-09-21 11:32:32,565 [Thread-6 ] DEBUG Modification - EmailAddress: david@biomedcentral.com
2005-09-21 11:32:32,565 [Thread-6 ] DEBUG Modification - Comment: test comment
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG Modification -
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG ModificationSet - Last modification: 09/21/2005 11:26:13
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG ModificationSet - Last modification: 09/21/2005 11:26:13
2005-09-21 11:32:32,580 [Thread-6 ] INFO Project - Project fileconverter: now building
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG CurrentBuildStatusListener - updating status to building for project fileconverter
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG MavenBuilder - Executing Command: \StdEnv\SYSTEM\Maven\bin\maven.bat -Dcclastbuildtimestamp=20050914134348 -Dlabel=build.2 -Dcclastgoodbuildtimestamp=20050914134348 -Dlastbuildsuccessful=true -Dcvstimestamp=2005-09-21 10:32:31 GMT -Dcctimestamp=20050921113231 -X -b -p project.xml eci:sscmget eci:install
2005-09-21 11:32:32,580 [Thread-6 ] DEBUG Commandline - Executing "\StdEnv\SYSTEM\Maven\bin\maven.bat -Dcclastbuildtimestamp=20050914134348 -Dlabel=build.2 -Dcclastgoodbuildtimestamp=20050914134348 -Dlastbuildsuccessful=true "-Dcvstimestamp=2005-09-21 10:32:31 GMT" -Dcctimestamp=20050921113231 -X -b -p project.xml eci:sscmget eci:install" in directory C:\StdEnv\PROJECTS\WORKFLOW\cruisecontrol\..\fileconverter

Yes I could patch if it would speed things up and people were happy.

D

Jerome Lacoste [29/Sep/05 01:08 AM]
fixed in my queue.

Jeffrey Fredrick [06/Oct/05 01:32 AM]
committed.