"Invalid revision range" during modifications check if multiple git source control used (Bug #196)


Added by Vladyslav Yakuba over 4 years ago. Updated over 3 years ago.


Status:Closed Start date:09/18/2012
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Source Control Spent time: -
Target version:1.8.4
Affected version:1.8.2

Description

Hello,
After upgrading from 1.6 to 1.8.2 getting error bellow:

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: fatal: Invalid revision range afe78734110cf5ee2daa4c237c037f1ece5017c4..origin/master
. Process command: C:\Program Files (x86)\Git\bin\git.exe log afe78734110cf5ee2daa4c237c037f1ece5017c4..origin/master --name-status --pretty=format:"Commit:%H%nTime:%ci%nAuthor:%an%nE-Mail:%ae%nMessage:%s%n%n%b%nChanges:" -m
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.MultiSourceControl.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

Nothing fancy in project configuration - 2 separate git repositories, branch names. Changing project working dir doesn't affect\resolve error.
short project configuration:

<project>
...
<workingDirectory>C:\somedir</workingDirectory>

<sourcecontrol type="multi">
<sourceControls>
<git>
...
<branch>bksave</branch>
<workingDirectory>C:\somedir\git_src</workingDirectory>
</git>
<git>
...
<branch>master</branch>
<workingDirectory>C:\somedir\git_test</workingDirectory>
</git>
</sourceControls>
</sourcecontrol>
</project>

After quick investigation - it appears that ccnet will generate 'git log' command using revision number from first(?) git source control. As i can see ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GetModifications changed vs. 1.6

The other side of this bug is that ccnet should treat such error as 'exception' and stop integration for that particular project. Because ccnet doesn't treat this error as 'exception' modification checks will be triggered as scheduled... i.e. if user have email notifications enabled - each time modifications checked, failed and result will be emailed.

At this point i wasn't able to figure any workaround, please let me know if there are any.

Thank you and please let me know if you have any questions.

Regards


History

Updated by Ruben Willems over 4 years ago

  • Target version deleted (1.8.2)

Updated by Olivier Sannier over 3 years ago

I'm having the exact same issue here.
Thing is, it is not an issue with GIT, but rather an issue with the MULTI source control that does not take care of the fact that any of its sub sourcecontrols will override the IIntegrationResult.SourceControlData value
So what we are seeing is that the first git block tries to use a revision hash from the second block
This could also happen with the SVN block, if the second one has revisions above the last revision of the first block.
What could even be weirder is to have a mix of both with SVN being the last and GIT the first (or the opposite).

Anyway, this is an issue in MultiSourceControl, I'll have a look.

Updated by Ruben Willems over 3 years ago

  • Assignee set to Ruben Willems
  • Target version set to 1.8.4

Updated by Ruben Willems over 3 years ago

  • Status changed from New to Closed
  • Assignee deleted (Ruben Willems)

Also available in: Atom PDF