Export to GitHub

jigomerge - issue #6

[SCRIPT] Commit after a successfull merge does not work inside jenkins plugin


Posted on Apr 28, 2011 by Grumpy Wombat

What steps will reproduce the problem? 1. Perform a merge with the jenkins plugin 2. See the merge exectued successfully 3. the commit failed

What is the expected output? What do you see instead? Merging 1 revisions ... Handling revision xxx ... Revision xxx has no conflict Committing merged revisions (xxx) ... class org.codehaus.groovy.runtime.InvokerInvocationException # java.io.FileNotFoundException: jigomerge-comments.txt (Permission denied)

What version of the product are you using? On what operating system? jenkins plugin 0.5

Please provide any additional information below. Groovy cannot create a file to store the commit log, because no directory is specified, so it try, by default, to create it at the root directory (/) and my jenkins user does not have right to write to /

Here is a proposal of patch :

--- a/jigomerge-2.2.4.groovy +++ b/jigomerge-2.2.4.groovy @@ -183,7 +183,7 @@ public class SvnMergeTool {

 if (!dryRun) {
   printOut.println 'Committing merged revisions (' + revisionsListLabel + ') ...'

- def commentFile = new File('jigomerge-comments.txt') + def commentFile = File.createTempFile('jigomerge-comments', '.txt') commentFile << 'Merged revisions : ' + revisionsListLabel + '\n' for (String revision in revisionsList) { def revisionComment = retrieveCommentFromRevisionWithLog(mergeUrl, revision)

Comment #1

Posted on Apr 30, 2011 by Grumpy Rabbit

(No comment was entered for this change.)

Comment #2

Posted on Apr 30, 2011 by Grumpy Rabbit

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium Version-2.2.5 Jigomerge-script