[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-08-08 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite closed an issue as Fixed 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Jenkins /  JENKINS-20393 
 
 
 
  Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 

Change By:
 
 Mark Waite 
 
 
 

Status:
 
 Resolved Closed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-22 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Kristian Kraljic Path: src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java http://jenkins-ci.org/commit/git-client-plugin/c9e96d48062e6a8ed11857f0f00a00c86ec76c98 Log: [Fix JENKINS-20393] Allow push for JGit repositories 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-22 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite resolved as Fixed 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
Will be included in the next git client plugin after 1.18.0 
 
 
 
 
 
 
 
 
 
 Jenkins /  JENKINS-20393 
 
 
 
  Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 

Change By:
 
 Mark Waite 
 
 
 

Status:
 
 Open Resolved 
 
 
 

Resolution:
 
 Fixed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-13 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Done so. Very nice test, I like it!  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-12 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
An initial idea for the test is evolving as PushTest.java. 
It is currently missing tests for branches other than master and for branch names which contain embedded slashes. I'm confident there are many other relevant cases which it is missing. Could you review it and provide your feedback on GitHub? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Thanks very much. I'm surprised that JGit doesn't allow HEAD:master as a valid refspec. I look forward to hearing the results of your investigation. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Seems that we will have to do in in two pulls anyways. The git-client-plugin pull and another pull for the GitPublisher. The refspec is set by the GitPublisher in line 242: 

 

PushCommand push = git.push().to(remoteURI).ref(HEAD: + mergeTarget);
 

 
In line 382 the right syntax is applied to the refspec: 

 

PushCommand push = git.push().to(remoteURI).ref(refs/notes/*);
 

 
Do you want to look into this, or should I propose a fix  create a pull request? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
I dumped the refspec to the console: 

 
Pushing HEAD to branch master at repo origin
RefSpec is HEAD:master
 

 
The RefSpec class of JGit mentions: 

 

/**
 * Parse a ref specification for use during transport operations.
 * p
 * Specifications are typically one of the following forms:
 * ul
 * licoderefs/heads/master/code/li
 * licoderefs/heads/master:refs/remotes/origin/master/code/li
 * licoderefs/heads/*:refs/remotes/origin/*/code/li
 * licode+refs/heads/master/code/li
 * licode+refs/heads/master:refs/remotes/origin/master/code/li
 * licode+refs/heads/*:refs/remotes/origin/*/code/li
 * licode+refs/pull/#42;/head:refs/remotes/origin/pr/*/code/li
 * licode:refs/heads/master/code/li
 * /ul
 *
 * @param spec
 *string describing the specification.
 * @throws IllegalArgumentException
 * the specification is invalid.
 */
 

 
Which applies that refs/heads/ is mandatory for JGit. Also checking Transport.REFSPEC_PUSH_ALL seems to apply to this pattern: 

 

refs/heads/*:refs/heads/*
 

 
Therefore PUSH_ALL would have (most likely) worked, which does indeed not apply for HEAD:master. I will find out where the refspec is concatenated and try to apply a fix. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 

[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Idumpedtherefspectotheconsole:{noformat}PushingHEADtobranchmasteratrepooriginRefSpecisHEAD:master{noformat}The[{{RefSpec}}class|https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java#L104-L122]ofJGitmentions:{code:java}/***Parsearefspecificationforuseduringtransportoperations.*p*Specificationsaretypicallyoneofthefollowingforms:*ul*licoderefs/heads/master/code/li*licoderefs/heads/master:refs/remotes/origin/master/code/li*licoderefs/heads/*:refs/remotes/origin/*/code/li*licode+refs/heads/master/code/li*licode+refs/heads/master:refs/remotes/origin/master/code/li*licode+refs/heads/*:refs/remotes/origin/*/code/li*licode+refs/pull/#42;/head:refs/remotes/origin/pr/*/code/li*licode:refs/heads/master/code/li*/ul**@paramspec*stringdescribingthespecification.*@throwsIllegalArgumentException*thespecificationisinvalid.*/{code}Whichappliesthat{{refs/heads/}}ismandatoryforJGit.Alsochecking{{Transport.REFSPEC_PUSH_ALL}}seemstoapplytothispattern:{code}refs/heads/*:refs/heads/*{code}Therefore PUSH_ALL {{REFSPEC_PUSH_ALL}} wouldhave( mostlikely _mostlikely_ )worked,whichdoesindeednotapplyfor{{HEAD:master}}.Iwillfindoutwheretherefspecis beeing concatenatedandtrytoapplyafix. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Could we detect this case in the JGit specific PushCommand and rewrite the push refspec to meet the JGit requirements?  
For example, could a private JGit refspec fixer method be called in the execute() method so that the scope of the change is limited to only the JGit specific portion of the code? I'd rather not have a more broad change when I believe the JGit implementation is the issue. 
I'd prefer that you continue investigating and propose a pull request so that I can continue my testing in preparation for the upcoming release of the plugin (and the git client plugin). If you can find a high confidence way to rewrite that PushCommand, then your change would likely be the last change into the git client plugin before its next release. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Sounds great. I'm just looking into how we could parse something like HEAD:master. The right way to do it is described here, but this is kind of tedious to do manually. JGit does unfortunately not convert e.g. HEAD or master to ref/heads/master or master to refs/remotes/origin/master. HEAD must be read from git-dir/HEAD while anything else, such as master or any sha-1 hash must find a matching equivalent in the refs. Maybe RefWalk will help, I'll keep you updated about my progress. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Soundsgreat.I'mjustlookingintohowwecouldparsesomethinglikeHEAD:master.Therightwaytodoitisdescribed[here|http://git-scm.com/docs/gitrevisions#_specifying_revisions],butthisiskindoftedioustodomanually.JGitdoesunfortunatelynotconverte.g.HEAD ormaster toref/heads/masterormastertorefs/remotes/origin/master onit'sown .HEADmustbereadfromgit-dir/HEADwhileanythingelse,suchasmasteroranysha-1hashmustfindamatchingequivalentintherefs.MaybeRefWalkwillhelp,I'llkeepyouupdatedaboutmyprogress. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Cool.Thanksforfindingthearticle.Shawnbasicallyconfirmsmystatementfromthelastpost,itisveryhardtogetfrommasterorHEADtorefs/heads/master.AdditionallyShawnansweredthequestion,whetherthereisaneasymethodoftheRepositorytolookupthosepaths.Regardinghisstatementbq.IfsomeoneexposedthisportionoftheresolvelogicintheRepositoryclass,IthinkitwouldbeafairlysimplechangeinPushtosupportthisDIWMery.Idon'tknowifthisisavailablemeanwhilelookingatthe[git-scmdocumentation|http://git-scm.com/docs/gitrevisions#_specifying_revisions].But(_andtocometoaconclusion_),Idon'tthinkweshouldgoforaprivateJGitrefspecfixerasyousuggested,hopingthatJGitwillimplementtheDWIMerywayofparsingrefspecs.Asashorttermandeasyfix,Iwouldsuggestchanging:{code:java}PushCommandpush=git.push().to(remoteURI).ref(HEAD:+branchName);{code}In{{GItPushlisher}}to:{code:java}PushCommandpush=git.push().to(remoteURI).ref(refs/heads/+branchName+:refs/heads/+branchName);{code}ThisshouldworkforbothCLIGitandJGit.Whatdoyouthink?Ifyouagree,Iwillprovideapullrequestforthe{{git-plugin}}.:-)IalreadytestedthechangeonmyproductiveJenkinsrunningonJGit.Withsuccess!:-){noformat}+/usr/user/jenkins/tools/jgit.shcommit-a-m'Change'[master5557fa6d89452a01cca3f1e34527afa21e86af39]ChangePushingHEADtobranchmasteratrepooriginRefSpecisrefs/heads/master:refs/heads/masterOpeningconnectionCountingobjectsFindingsourcesGettingsizesCompressingobjectsWritingobjectsremote:ResolvingdeltasFinished:SUCCESS{noformat}Andindeed,the origin repositorywaschanged! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Cool.Thanksforfindingthearticle.Shawnbasicallyconfirmsmystatementfromthelastpost,itisveryhardtogetfrommasterorHEADtorefs/heads/master.AdditionallyShawnansweredthequestion,whetherthereisaneasymethodoftheRepositorytolookupthosepaths.Regardinghisstatementbq.IfsomeoneexposedthisportionoftheresolvelogicintheRepositoryclass,IthinkitwouldbeafairlysimplechangeinPushtosupportthisDIWMery.Idon'tknowifthisisavailablemeanwhilelookingatthe[git-scmdocumentation|http://git-scm.com/docs/gitrevisions#_specifying_revisions].But(_andtocometoaconclusion_),Idon'tthinkweshouldgoforaprivateJGitrefspecfixerasyousuggested,hopingthatJGitwillimplementtheDWIMerywayofparsingrefspecs.Asashorttermandeasyfix,Iwouldsuggestchanging:{code:java}PushCommandpush=git.push().to(remoteURI).ref(HEAD:+branchName);{code}In{{GItPushlisher}}to:{code:java}PushCommandpush=git.push().to(remoteURI).ref(refs/heads/+branchName+:refs/heads/+branchName);{code}ThisshouldworkforbothCLIGitandJGit.Whatdoyouthink?Ifyouagree,Iwillprovideapullrequestforthe{{git-plugin}}.:-)IalreadytestedthechangeonmyproductiveJenkinsrunningonJGit.Withsuccess!:-) *happy* {noformat}+/usr/user/jenkins/tools/jgit.shcommit-a-m'Change'[master5557fa6d89452a01cca3f1e34527afa21e86af39]ChangePushingHEADtobranchmasteratrepooriginRefSpecisrefs/heads/master:refs/heads/masterOpeningconnectionCountingobjectsFindingsourcesGettingsizesCompressingobjectsWritingobjectsremote:ResolvingdeltasFinished:SUCCESS{noformat}Andindeed,therepositorywaschanged! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Cool. Thanks for finding the article. Shawn basically confirms my statement from the last post, it is very hard to get from master or HEAD to refs/heads/master. Additionally Shawn answered the question, whether there is an easy method of the Repository to lookup those paths. Regarding his statement 

If someone exposed this portion of the resolve logic in the Repository class, I think it would be a fairly simple change in Push to support this DIWMery. 
 
I don't know if this is available meanwhile looking at the git-scm documentation. But (and to come to a conclusion), I don't think we should go for a private JGit refspec fixer as you suggested, hoping that JGit will implement the DWIMery way of parsing refspecs. 
As a short term and easy fix, I would suggest changing: 

 

PushCommand push = git.push().to(remoteURI).ref(HEAD:+branchName);
 

 
In GItPushlisher to: 

 

PushCommand push = git.push().to(remoteURI).ref(refs/heads/ + branchName + :refs/heads/ + branchName);
 

 
This should work for both CLI Git and JGit. What do you think? If you agree, I will provide a pull request for the git-plugin.  
I already tested the change on my productive Jenkins running on JGit. With success!  happy 

 
+ /usr/user/jenkins/tools/jgit.sh commit -a -m 'Change'
[master 5557fa6d89452a01cca3f1e34527afa21e86af39] Change
Pushing HEAD to branch master at repo origin
RefSpec is refs/heads/master:refs/heads/master
Opening connection
Counting objects
Finding sources
Getting sizes
Compressing objects
Writing objects
remote: Resolving deltas
Finished: SUCCESS
 

 
And indeed, the repository was changed! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

  

[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 [~kriskra]I'mbiasedagainstachangeintherefspecintheGitPublisherbecausethatchangesthebehaviorforbothCLIgitandJGittodisallowuseofrefs/heads/asaprefixtothebranchname.Ibelievethereareotherplacesinthepluginwhererefs/heads/isallowedastheprefixtoabranchname.MyrationaleforthechangebeinginsidetheJGitimplementation(evenifitisfarlesselegantthanchangingGitPublisher)isthattheJGitimplementationhasneverbeenabletopushunlessauserspecificallyusedrefs/heads/masterastheirbranchname.IfthechangebreaksJGitpush,itwillnotbeanymorebrokenthanitistoday.IftheGitPublisherchangeinadvertentlybreaksausecasefor1%ofthe6+installationsoftheplugin,therewillbe 60+ 600 installationsbroken.I'mgladthechangeinGitPublisherworkedforyou.That'sagoodresult.Unfortunately,therearesomanydiverseusecasesofthegitpluginandthegitclientpluginthatI'munlikelytoallowthattypeofchangeinGitPublisher. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Kristian Kraljic I'm biased against a change in the refspec in the GitPublisher because that changes the behavior for both CLI git and JGit to disallow use of refs/heads/ as a prefix to the branch name. I believe there are other places in the plugin where refs/heads/ is allowed as the prefix to a branch name. 
My rationale for the change being inside the JGit implementation (even if it is far less elegant than changing GitPublisher) is that the JGit implementation has never been able to push unless a user specifically used refs/heads/master as their branch name. If the change breaks JGit push, it will not be any more broken than it is today. If the GitPublisher change inadvertently breaks a use case for 1% of the 60 000+ installations of the plugin, there will be 60+ installations broken. 
I'm glad the change in GitPublisher worked for you. That's a good result. Unfortunately, there are so many diverse use cases of the git plugin and the git client plugin that I'm unlikely to allow that type of change in GitPublisher. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Understood and agreed!  I'll try to find a semi-elegant way to fix it in JGitAPIImpl. 
Thanks a lot for your support so far! I'll post a pull request to git-client-plugin some minutes then. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 CouldwedetectthiscaseintheJGitspecificPushCommandandrewritethepushrefspectomeettheJGitrequirements?Forexample,couldaprivateJGitrefspecfixermethodbecalledinthe[execute()method|https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java#L1789]sothatthescopeofthechangeislimitedtoonlytheJGitspecificportionofthecode?I'drathernothaveamorebroadchangewhenIbelievetheJGitimplementationistheissue.I'dpreferthatyoucontinueinvestigatingandproposeapullrequestsothatIcancontinuemytestinginpreparationfortheupcomingreleaseoftheplugin(andthegitclientplugin).IfyoucanfindahighconfidencewaytorewritethatPushCommand,thenyourchangewouldlikelybethelastchangeintothegitclientpluginbeforeitsnextrelease. I've[mergedyourchange|https://github.com/jenkinsci/git-client-plugin/pull/172]tothemasterrepo,and[submittedatest|https://github.com/MarkEWaite/git-client-plugin/commit/e0c6d07dcf95d32c20534ee271f0a828cd2bc4be]anda[revisionofthattest|https://github.com/MarkEWaite/git-client-plugin/commit/85a496fed6f20d57288c67346535eb9fded6bf79]thatshowsthefailuretomyforkoftherepo. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Soundsgreat.I'mjustlookingintohowwecouldparsesomethinglikeHEAD:master.Therightwaytodoitisdescribed[here|http://git-scm.com/docs/gitrevisions#_specifying_revisions],butthisiskindoftedioustodomanually.JGitdoesunfortunatelynotconverte.g.HEADtoref/heads/masterormastertorefs/remotes/origin/masteronit'sown.HEADmustbereadfromgit-dir/HEADwhileanythingelse,suchasmasteroranysha-1hashmustfindamatchingequivalentintherefs.MaybeRefWalkwillhelp,I'llkeepyouupdatedaboutmyprogress.  I'llcontinueonthisinaboutanhour,let'sseeifwecangetafixreadytoday.:-) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Thanks! Shawn Pearce (one of the JGit authors) describes why JGit does not accept HEAD:master in a mail forum from a while ago. It is an interesting read. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Hey Mark, as suggested I have added a fixRefSpec() to JGitAPIImpl, which gets called in the execute method of PushCommand. I have opened a new pull request to git-client-plugin. 
fixRefSpec() should fix the most common refSpecs for JGit. I decided to simply map HEAD to refs/heads/master or if HEAD:branch is given to refs/heads/branch. This should do the trick for 90% of the use-cases hopefully. A quick collection of fixes: 

 

: fixed to: :refs/heads/master
master fixed to: refs/heads/master:refs/heads/master
:master fixed to: :refs/heads/master
HEAD fixed to: refs/heads/master:refs/heads/master
HEAD:master fixed to: refs/heads/master:refs/heads/master
HEAD:branch fixed to: refs/heads/branch:refs/heads/branch
master:master fixed to: refs/heads/master:refs/heads/master
branch:branch fixed to: refs/heads/branch:refs/heads/branch
master:branch fixed to: refs/heads/master:refs/heads/branch
:refs/heads/master fixed to: :refs/heads/master
refs/heads/master fixed to: refs/heads/master:refs/heads/master
refs/heads/master:master fixed to: refs/heads/master:refs/heads/master
master:refs/heads/master fixed to: refs/heads/master:refs/heads/master
tags/tag fixed to: refs/tags/tag:refs/tags/tag
/tags/tag fixed to: refs/tags/tag:refs/tags/tag
 

 
I tested the fixing with the original version of git-plugin and it worked flawless!  So I think is solution is also quite nice, I guess. Plus not having to fear 60k installations broken, is a releief for my first contribution to the Jenkins community!  Could you try to run your new test case on it, to see if it's working propertly? Thanks again and have a great weekend. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received 

[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Please do so, I still havn't set-up my IDE to work with Jenkins.  So I couldn't run the changes locally and had to package/upload the plugin to test. Writing and testing the test cases would be very tedious right now. Thanks in advance!  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
I sure can. I think I'll take your table of transformations and create a parameterized unit test to exercise each of those cases. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-11 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Just one more thing. The JGitAPIImplTest.test_fetch_needs_preceding_prune test fails at line 1050: 

 

w.git.push(origin, parent/a);
 

 
I assumed that branches may not contain any /. I fixed the fixRefSpec implementation. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 HeyMark.Ihaven'tconfiguredandevelopmentenvironmentforJenkinsyet.ButIhadaquicklookattheJGitAPIImplpushcode.InmyfirstreviewIfoundaflawregardingtheevaluationofPushResults.IfthePushCommandcallreturnswithoutanexception,itdoesnotmeananyitemwaspushedsuccesfully.ThePushResulthastobeevaluated.Ihavecreatedapullrequesthttps://github.com/jenkinsci/git-client-plugin/pull/172.Pleasedoreviewthepullrequestfirst,becauseIdon'thaveaccesstoanIDEjustnow,Imadethechangesmanually.Implementingthechangeshouldatleastresultinanerrorifthepushfails. Afterwardswecancheckfurther. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Hey Mark. I haven't configured an development environment for Jenkins yet. But I had a quick look at the JGitAPIImpl push code. In my first review I found a flaw regarding the evaluation of PushResults. If the PushCommand call returns without an exception, it does not mean any item was pushed succesfully. The PushResult has to be evaluated. I have created a pull request https://github.com/jenkinsci/git-client-plugin/pull/172. Please do review the pull request first, because I don't have access to an IDE just now, I made the changes manually. 
Implementing the change should at least result in an error if the push fails. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 bq.Veryniceresult!Thatshouldbeenoughtoallowbetterdiagnosisinthedebugger.That one on theonehandsideandontheotherhand,itshouldhelpwithotherpushrelatederrors,whichstayedundetectedduetothemissingPushResultevaluation.bq.ItmaybethatTransport.REF_SPEC_PUSH_ALListhewrongrefspectoassignforapush.Thatmightbeindeedthecase.It'squitelatehere,Iwilltrytodigintothistomorrow.Asyousaid,onemoredebugsessionshouldbeenoughtofindtheroot-causehopefully!:-) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 bq.Veryniceresult!Thatshouldbeenoughtoallowbetterdiagnosisinthedebugger.Thatontheonehandsideandontheotherhand,itshouldhelpwithotherpushrelatederrors,whichstayedundetectedsofar,duetothemissingPushResultevaluation.bq.ItmaybethatTransport.REF_SPEC_PUSH_ALListhewrongrefspectoassignforapush.Thatmightbeindeedthecase.It'squitelatehere,Iwilltrytodigintothistomorrow.Asyousaid,onemoredebugsessionshouldbeenoughtofindtheroot-cause , hopefully!:-) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 bq.Veryniceresult!Thatshouldbeenoughtoallowbetterdiagnosisinthedebugger.Thatontheonehandsideandontheotherhand,itshouldhelpwithotherpushrelatederrors,whichstayedundetected sofar, duetothemissingPushResultevaluation.bq.ItmaybethatTransport.REF_SPEC_PUSH_ALListhewrongrefspectoassignforapush.Thatmightbeindeedthecase.It'squitelatehere,Iwilltrytodigintothistomorrow.Asyousaid,onemoredebugsessionshouldbeenoughtofindtheroot-causehopefully!:-) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 

Very nice result! That should be enough to allow better diagnosis in the debugger.
 
That one the one hand side and on the other hand, it should help with other push related errors, which stayed undetected due to the missing PushResult evaluation. 

It may be that Transport.REF_SPEC_PUSH_ALL is the wrong refspec to assign for a push.
 
That might be indeed the case. It's quite late here, I will try to dig into this tomorrow. As you said, one more debug session should be enough to find the root-cause hopefully!  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 HeyMark,Ire-builtthegit-clientpluginmyself,withthechangeofhttps://github.com/jenkinsci/git-client-plugin/pull/172and *asexpected* _asexpected_ thebuildisfailing!:-)Sothechangewasasuccess.Hereisthebuildlog:{noformat}...PushingHEADtobranchmasteratrepooriginOpeningconnectionCountingobjectsFindingsourcesGettingsizesCompressingobjectsWritingobjectsremote:ResolvingdeltasERROR:Failedtopushbranchmastertooriginhudson.plugins.git.GitException:funnyrefname atorg.jenkinsci.plugins.gitclient.JGitAPIImpl$8.execute(JGitAPIImpl.java:1772) athudson.plugins.git.GitPublisher.perform(GitPublisher.java:342) athudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) athudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) athudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) athudson.model.Build$BuildExecution.post2(Build.java:183) athudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) athudson.model.Run.execute(Run.java:1766) athudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) athudson.model.ResourceController.execute(ResourceController.java:98) athudson.model.Executor.run(Executor.java:374)Buildstep'GitPublisher'markedbuildasfailureFinished:FAILURE{noformat}funnyrefnameisreturnedbyJGit,soIassumethereissomethingwrongwiththerefnamedefinition.Doyouhaveanidea? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Hey Mark, I re-built the git-client plugin myself, with the change of https://github.com/jenkinsci/git-client-plugin/pull/172 and as expected the build is failing!  So the change was a success. Here is the build log: 

 
...
Pushing HEAD to branch master at repo origin
Opening connection
Counting objects
Finding sources
Getting sizes
Compressing objects
Writing objects
remote: Resolving deltas
ERROR: Failed to push branch master to origin
hudson.plugins.git.GitException: funny refname
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl$8.execute(JGitAPIImpl.java:1772)
	at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:342)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
	at hudson.model.Build$BuildExecution.post2(Build.java:183)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:374)
Build step 'Git Publisher' marked build as failure
Finished: FAILURE
 

 
funny refname is returned by JGit, so I assume there is something wrong with the refname definition. Do you have an idea? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.

[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Veryniceresult . ! Thatshouldbeenoughtoallowbetterdiagnosisinthedebugger.Isuspectthattherefspechasbeensettoanincorrectvaluebythecaller,andthenisbeing[usedintheexecute()method|https://github.com/kristian/git-client-plugin/blob/0a4468a20a291989ae4a67a091f73d36e343c95f/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java#L1794].Asessionwithadebugger(orwithinsertedloggingstatements)willshowthevalueofrefspecwhenthatfailureisdetected.Itmaybethat[Transport.REF_SPEC_PUSH_ALL|http://download.eclipse.org/jgit/site/4.0.1.201506240215-r/apidocs/org/eclipse/jgit/transport/Transport.html#REFSPEC_PUSH_ALL]isthewrongrefspectoassignforapush. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Very nice result. That should be enough to allow better diagnosis in the debugger. 
I suspect that the refspec has been set to an incorrect value by the caller, and then is being used in the execute() method. A session with a debugger (or with inserted logging statements) will show the value of refspec when that failure is detected. It may be that Transport.REF_SPEC_PUSH_ALL is the wrong refspec to assign for a push. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-10 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite edited a comment on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 Veryniceresult!Thatshouldbeenoughtoallowbetterdiagnosisinthedebugger.Isuspectthattherefspechasbeensettoanincorrectvaluebythecaller,andthenisbeing[usedintheexecute()method|https://github.com/kristian/git-client-plugin/blob/0a4468a20a291989ae4a67a091f73d36e343c95f/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java#L1794].Asessionwithadebugger(orwithinsertedloggingstatements)willshowthevalueofrefspecwhenthatfailureisdetected.  Itmaybethat[Transport.REF_SPEC_PUSH_ALL|http://download.eclipse.org/jgit/site/4.0.1.201506240215-r/apidocs/org/eclipse/jgit/transport/Transport.html#REFSPEC_PUSH_ALL]isthewrongrefspectoassignforapush. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-09 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
As far as I can tell from my reading of the source code and from the output of the job I ran last night to test it, the JGit implementation is attempting to push the changes to the remote git repository. The messages in the log indicate the push is being attempted, and the implementation in JGitAPIImpl.java sure looks like it is trying to support push. 
Those two things make it all the more puzzling why the push does not succeed. I suspect there is something missing in the implementation of the JGit push, but I didn't detect what was missing in my initial review. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-09 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Hey Mark, just to clarify. A while back you stated in 

JENKINS-25797
 that JGitAPIImpl is lacking a push implementation that canbe used by GitPublisher. Could this still be the case and the cause of the problem? I hadn't had the chance to check the JGitAPIImpl implementation yet, what do you think? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-08 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Mark Waite commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
One work around is to use command line git instead of JGit. 
I don't know the root cause, since job gives the usual log information which would indicate it was pushing using JGit (at least in my case), but the changes never appear in the remote repository. 
You could also download the git client plugin source code, write a test which shows the problem, then write the code to fix the test, and submit that as a pull request. That area of the code is unfamiliar to me. It appears to temporarily configure a remote, then uses that temporarily configured remote to push the changes, then removes the definition of that remote. I assume that was simpler to implement than deducing the name of the remote which was used to clone the workspace. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2015-07-08 Thread k...@kra.lc (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kristian Kraljic commented on  JENKINS-20393 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Git plugin 2.0 JGit implementation does not publish merge result  
 
 
 
 
 
 
 
 
 
 
Hello Mark, 
Is there any workaround available? Or could you locate the root cause? Is there anything I can help you with fixing? 

JENKINS-29271
 is affecting a productive scenario in our case, so I am very interested in a fix. 
Thanks  regards, Kristian 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [git-client-plugin] (JENKINS-20393) Git plugin 2.0 JGit implementation does not publish merge result

2014-12-25 Thread mark.earl.wa...@gmail.com (JIRA)















































Mark Waite
 assigned  JENKINS-20393 to Unassigned



Git plugin 2.0 JGit implementation does not publish merge result
















Change By:


Mark Waite
(25/Dec/14 3:29 PM)




Assignee:


NicolasDeLoof



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.