[Git-plugin] fatal: ambiguous argument 'origin/master^{commit}'

2013-07-16 Thread michaelsdev
Hi,

I've been trying to test on my changes to the git-plugin and ran into fatal 
errors, which Im pretty sure that were not caused by my changes (see 
JOB_LOG)

So what is it about? Did I miss to specify something?

Thank very much


What I did:
I cloned a test repo and it has a origin/master and one origin/feata branch 
on it.

mvn hpi:run  <-- That is   git-client plugin and so on are already loaded. 
(Its a 1.4.1-snapshot)  - I tried ubuntu (open jdk) and also windows (sun 
java)

In order to test merging, I entered the full path to the repo, a build 
branch feata  and I defined "master" as the branch to merge to 
(mergeoptions).
I also tried other configs and all resulted in the log below.



JOB_LOG:
Started by user 
 
[8mha:ih+LCABb85aBtbiIQSajNKU4P08vOT+vOD8nVc+jsiC1KCczL9svvyT1dMUiOWdZ/mImBiZPBrac1Lz0kgwfBubSopwSBiGfrMSyRP2cxLx0/eCSosy8dOuKIgYpNOOcITTIMAYIYGRiYKgoADI4Sxi49EuLU4v080pzcgCbGluCjw==
 [0manonymous
Building in workspace path.../workspace/testee
Checkout:testee / path.../workspace/testee - 
hudson.remoting.LocalChannel@bb3e2
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Commencing build of Revision 585bdf79569179bdccffa6cd540c08561ff0fce1 
(origin/feata)
MergeFlag entered:--no-ff <--- At this point a flag that I introduces is 
wirrten to the enviroment (not the problem)
Merging Revision 585bdf79569179bdccffa6cd540c08561ff0fce1 (origin/feata) 
onto master
FATAL: Command "git rev-parse origin/master^{commit}" returned status code 
128:
stdout: origin/master^{commit}

stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown 
revision or path not in the working tree.
Use '--' to separate paths from revisions

 
[8mha:WB+LCABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWA=
 [0mhudson.plugins.git.GitException: 
Command "git rev-parse origin/master^{commit}" returned status code 128:
stdout: origin/master^{commit}

stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown 
revision or path not in the working tree.
Use '--' to separate paths from revisions

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:750)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:264)
at hudson.plugins.git.GitAPI.revParse(GitAPI.java:252)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1161)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1143)
at hudson.FilePath.act(FilePath.java:839)
at hudson.FilePath.act(FilePath.java:821)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1143)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
at 
hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:586)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
at hudson.model.Run.run(Run.java:1438)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:239)

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




Re: [git plugin] hpi:run, but where is the snapshot's hpi?

2013-07-09 Thread michaelsdev
Thank you Stephen,

that was the kind of answer I hoped for.

since the idea was to make some tiny changes, I go with the -DskipTests 
flag.
The failures only arise from a bad set up and not because of bad code.
At least I assume the code from the repositories always passes the tests, 
and my version is almost the same as the outchecked version.

Thanks again

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




Re: [Git plugin] Where in the code is the actual "git merge" command ?

2013-07-09 Thread michaelsdev
Thank you Ivan and nicolas.

I think now the call of (high level) 
  git.merge at gitplugin 
https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L1160
corresponds with (low level) 
  git-client-plugin's 
https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L416

Correct?

So nicolas, please tell me how you intended to allow for simple flags like 
"--no-ff" to flow from high to low.
I think I could replace the high level call with:

launchCommand("merge", rev.name(), MYFLAG );

But I guess this is a rather quick and dirty solution bypassing the wrapper 
function.
Use of the @Deprecated  public void merge(String refSpec)  method at 
CliGitAPIImpl.java:1114 is out of the question too, I guess.

So is there a better/intended way of passing flags to actual commands?
A flag setter or a way to use GitSCM.java's  "EnvVars environment;"  ?

Thank you very much

Michael

Am Montag, 8. Juli 2013 07:03:10 UTC+2 schrieb nicolas de loof:
>
> git plugin relies on git-client plugin for repo commands execution
>
>
> 2013/7/7 Ivan Kalinin >
>
>> Looks like it is here: 
>> https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L1160
>>
>> On Saturday, July 6, 2013 1:46:56 AM UTC+4, michaelsdev wrote:
>>>
>>> Hi,
>>>
>>> Where in the code is the actual "git merge" command ?
>>>
>>> I could not find the place where it is executed.
>>>
>>> Thanks a lot
>>>
>>> Michael
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-de...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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




[git plugin] hpi:run, but where is the snapshot's hpi?

2013-07-05 Thread michaelsdev
Hi,

I did a minor change and when I execute *mvn hpi:run* jenkins and the 
plugins work like a charm.
In the plugin manager the plug in is displayed: 
Jenkins GIT plugin 1.4.1-SNAPSHOT (private-07/05/2013 22:45-User) 

But where is it's *.hpi* file?
(*mvn package* ends up in failures so there is no final hpi)

Thank you very much

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




[Git plugin] Where in the code is the actual "git merge" command ?

2013-07-05 Thread michaelsdev
Hi,

Where in the code is the actual "git merge" command ?

I could not find the place where it is executed.

Thanks a lot

Michael

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




Re: Wont pass tests, perhaps newbie issue

2013-07-02 Thread michaelsdev
Ok. 
On win 7 I got it working, I think.
But the expected git.hpi ist not present in git-plugin\work\plugins folder. 
Theres only a git.HPL which I dont know what to do with.
Does this mean it still failed somehow or how do I deploy this? Shouldn't 
there be a git.hpi ?
I uploaded all the hpi that I found. Like token, parameterize, multipl 
scms, git-client.

My goal was to change its gui. git-client does not provide it.
cloned from https://github.com/jenkinsci/git-plugin.git

Thanks.

Am Mittwoch, 26. Juni 2013 23:56:58 UTC+2 schrieb michaelsdev:
>
> Hi,
>
> I wanted to contribute. Appearently the current master's git plugin did 
> not pass the tests.
>
> So please tell me how to solve this. I guess its only my bad for being too 
> new to this code.
>
> If that is not a minor thing to be handled in few steps, then I would not 
> mind turning off the tests. 
> I just wanted to make a tiny change in the gui for the git commands 
> (adding a field for taking a little option, passing it to the git command).
> So I would not need all the functionallity in place.
>
>
> What I did:
> mvn clean install -e
>
> What I got: (full stack trace in attached file)
>
>   5 [INFO] Building Jenkins GIT plugin 1.4.1-SNAPSHOT
>   6 [INFO] 
> 
>   7 [INFO]
>   8 [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ git ---
>   9 [INFO] Deleting 
> .../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target
>  10 [INFO]
>  11 [INFO] --- maven-hpi-plugin:1.74:validate (default-validate) @ git ---
>  12 [INFO]
>  13 [INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default) @ 
> git ---
>  14 [INFO] Maven Version: 3.0.5
>  15 [INFO] JDK Version: 1.6.0_27 normalized as: 1.6.0-27
>
> Ubuntu 12.04
> Jenkins ver. 1.424.6 <http://jenkins-ci.org/>
>
> ...
>
> Tests in error: 
>   initializationError(hudson.plugins.git.GitChangeLogParserTest): 
> com.sun.jna.Native.open(Ljava/lang/String;)J
>   initializationError(hudson.plugins.git.GitChangeSetTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitPublisherTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitSCMTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitStatusTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.MultipleSCMTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.RevisionParameterActionTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.util.BuildDataTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.util.CommitTimeComparatorTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(InjectedTest): org.jvnet.hudson.test.HudsonTestCase
>
>
> So now lets see if open source is a good idea.
>
> Michael
>
>

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




Re: Wont pass tests, perhaps newbie issue

2013-06-28 Thread michaelsdev
What machines do you use for compiling?
I could also try an Arch based system, if that helps. Or windows if I 
really must.

>From the Jenkins guide: "To develop a plugin, you need Maven 
>3
 (why? ) 
and JDK 6.0 or later. "
I would be surprised if openJDK was much behind, because Oracles 
drives/supports openJDK.
Perhaps trying openJDK 7 makes a difference?

Please provide your setup as Mark did.

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




Re: Wont pass tests, perhaps newbie issue

2013-06-28 Thread michaelsdev
Thanks for all your replies. 

@Kevin

> I would start by removing all the stuff you have added to the PATH, 
> removing the extra environment variables (other than JAVA_HOME), and trying 
> again. None of this is necessary on a normal installation, and might be 
> causing your issues


I tried various combinations.
It does not seem to effect the nature of the beast at all, which is errors 
on  com.sun.jna.Native and org.jvnet.hudson.test.HudsonTestCase

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




Re: Wont pass tests, perhaps newbie issue

2013-06-28 Thread michaelsdev
Well how to I set up my env for this? (see my current env)
org.jvnet.hudson.test.HudsonTestCase ? Is there more prerequisites ?
I have only got a Jenkins installed and running, maven 3  + git plugin src. 
What else would I need?


My curent env:
JNA_LIBRARY_PATH=/usr/share/java/  // I 
created this, also in PATH,  it contains the jna.jar
PATH=/usr/local/apache-maven-3.0.5/bin:
/usr/lib/lightdm/lightdm:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/home/michael/.cabal/bin/:
/home/michael/os_current/src/utils/:
/usr/lib/jvm/java-6-openjdk-i386/jre/bin:
/usr/share/java/

JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386/jre   // I 
created this, also in PATH
M3_HOME=/usr/local/apache-maven-3.0.5 // I 
created this, also in PATH


Tests in error: 
>   initializationError(hudson.plugins.git.GitChangeLogParserTest): 
> com.sun.jna.Native.open(Ljava/lang/String;)J
>
 

>   initializationError(hudson.plugins.git.GitChangeSetTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitPublisherTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitSCMTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.GitStatusTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.MultipleSCMTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.RevisionParameterActionTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.util.BuildDataTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(hudson.plugins.git.util.CommitTimeComparatorTest): 
> org.jvnet.hudson.test.HudsonTestCase
>   initializationError(InjectedTest): org.jvnet.hudson.test.HudsonTestCase
>
>

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




Re: Wont pass tests, perhaps newbie issue

2013-06-26 Thread michaelsdev
I forgot to mention:

Im Testing on an older Jenkins just for this gui change.

The targeted system is Jenkins ver. 1.509.1 
And its git plugin is so far version 
1.1.16

Upgrade to later versions might be prohibited for me. I might need to 
update on that older code.

Bye

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




Wont pass tests, perhaps newbie issue

2013-06-26 Thread michaelsdev
Hi,

I wanted to contribute. Appearently the current master's git plugin did not 
pass the tests.

So please tell me how to solve this. I guess its only my bad for being too 
new to this code.

If that is not a minor thing to be handled in few steps, then I would not 
mind turning off the tests. 
I just wanted to make a tiny change in the gui for the git commands (adding 
a field for taking a little option, passing it to the git command).
So I would not need all the functionallity in place.


What I did:
mvn clean install -e

What I got: (full stack trace in attached file)

  5 [INFO] Building Jenkins GIT plugin 1.4.1-SNAPSHOT
  6 [INFO] 

  7 [INFO]
  8 [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ git ---
  9 [INFO] Deleting 
.../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target
 10 [INFO]
 11 [INFO] --- maven-hpi-plugin:1.74:validate (default-validate) @ git ---
 12 [INFO]
 13 [INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default) @ 
git ---
 14 [INFO] Maven Version: 3.0.5
 15 [INFO] JDK Version: 1.6.0_27 normalized as: 1.6.0-27

Ubuntu 12.04
Jenkins ver. 1.424.6 

...

Tests in error: 
  initializationError(hudson.plugins.git.GitChangeLogParserTest): 
com.sun.jna.Native.open(Ljava/lang/String;)J
  initializationError(hudson.plugins.git.GitChangeSetTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.GitPublisherTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.GitSCMTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.GitStatusTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.MultipleSCMTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.RevisionParameterActionTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.util.BuildDataTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(hudson.plugins.git.util.CommitTimeComparatorTest): 
org.jvnet.hudson.test.HudsonTestCase
  initializationError(InjectedTest): org.jvnet.hudson.test.HudsonTestCase


So now lets see if open source is a good idea.

Michael

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


[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building Jenkins GIT plugin 1.4.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ git ---
[INFO] Deleting 
.../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target
[INFO] 
[INFO] --- maven-hpi-plugin:1.74:validate (default-validate) @ git ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default) @ git ---
[INFO] Maven Version: 3.0.5
[INFO] JDK Version: 1.6.0_27 normalized as: 1.6.0-27
[INFO] OS Info: Arch: i386 Family: unix Name: linux Version: 
3.2.0-48-generic-pae
[INFO] 
[INFO] --- maven-localizer-plugin:1.13:generate (default) @ git ---
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ git ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 79 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ git ---
[INFO] Compiling 45 source files to 
.../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target/classes
[INFO] 
[INFO] --- access-modifier-checker:1.4:enforce (default-enforce) @ git ---
[INFO] 
[INFO] --- bridge-method-injector:1.4:process (default) @ git ---
[INFO] 
[INFO] --- maven-hpi-plugin:1.74:insert-test (default-insert-test) @ git ---
[INFO] 
[INFO] --- gmaven-plugin:1.3:generateTestStubs (test-in-groovy) @ git ---
[INFO] No sources found for Java stub generation
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
git ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ git 
---
[INFO] Compiling 21 source files to 
.../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target/test-classes
[INFO] 
[INFO] --- maven-hpi-plugin:1.74:test-hpl (default-test-hpl) @ git ---
[INFO] Generating 
.../pathToDownloaded_jenkins_git_plugin/jenkins_plugin/git-plugin/target/test-classes/the.hpl
[INFO] 
[INFO] --- maven-hpi-plugin:1.74:resolve-test-dependencies 
(default-r