Hi All,
I'm not able to see the output in my git console after doing
git push http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.git
I did SDK setup and run it properly.
I got stash console and I able to see the commited messages there.
I enabled the hook in my project repo settings
Everything is working fine but want to see the output after pushing,
Added this print statement at start line in my hook class of public boolean onReceive()
hookResponse.out().println("=============================================== check check check ==========================================");
So can anyone suggest how to get that print statement in client console/git
or where can i find the print statements.
Thanks in advance
Anil
Hi All,
I figured out the problem, i.e., Earlier after installing the atlas sdk nd created plugin and in te hook file i put some print statements and i expected output in client console i.e., on git after doing git push ..
The solution i observed is i need to re run the "atlas-run"
@Balazs Szakmary, thanks for the suggestions.
@Michael Heemskerk, thanks for the debug tip. For now i am not using the ide tool to debug due to other task, but i need to do the debug in eclipse etc.,.I'l come here for the ide issue(s) etc.,
Thanks&Regards
Anil Kumar
Ah yes, you definitely need to redeploy your plugin when you make a change. You don't have to restart your whole server though. As an alternative you can run atlas-cli (in the directory containing the pom.xml of your plugin) and then pi to reinstall the plugin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks for the plugin reinstallation tip,
I need to get and show the merge details of plugin, actually just I created a new question.
https://answers.atlassian.com/questions/272326/how-to-get-the-merge-details-with-plugin
Can you suggest the way on this.
Regards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you are rejecting the commit, you should print the reason like this:
hookResponse.err().println(errorMessage);
and then it will get to the client.
Hope this helps,
Balazs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balazs,
I tried with hookResponse.err().println(" some text"), inorder to display something in client console.
But it is not happening.
My doubt is My hoook class is not at all executing and after doing git push "http://xxxxx.git"
To check I used in my hook class like this
public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
{
return false
}
after this I dded and commited some files and now with git push "http://xxxxx.git" it is simply pushing the contents to the git.
I think my hook is not at all calling...how to check whether my hook class is getting call/working properly..
Regards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As a first test to verify that your hook is being called, I'd spin up Stash in debug mode and set a breakpoint in your onReceive method (or alternatively, write something to the Stash log).
Cheers,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks for the reply. May I know how to do "Stash in debug mode" and setting the breakpoint.
Actually, I configured the SDK and I'm running the plugin. But I didn't integrate into Eclipose IDE.
I think as per you inorder to debug , I need to work with IDE right?..or normally without IDE also can we debug?..
Reards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can start up Stash in debug mode by using atlas-debug. Then you need to set up a remote debug target in Eclipse to attach the debugger.
https://developer.atlassian.com/display/DOCS/Creating+a+Remote+Debug+Target
should provide some guidance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is the hook enabled for the repository where you are pushing? You need to do this one-by-one for all the repos where you want to do this. (Settings/hooks on the web interface.)
Balazs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, Balazs Szakmary, I already enabled it. And then I'm trying. I didnt get why my print staements are not displaying in git and even I just did return false in public boolean onReceive(){} though push is working with git, But it should not be.
I missed something else. but main thing is why my hook class is not getting called?..
All the commits which I did in git were displayed in stash server.
Can you suggest me why my hook class is not calling.
Just I uploaded the snaps of Repo permission, Hook Settings, Project permissions.
Is there any wrong in it/Did I miss anything...
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry, I am out of ideas. If it is installed correctly and enabled on the repo you are pushing to, the return false should reject the push.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balazs,
I tried with hookResponse.err().println(" some text"), inorder to display something in client console.
But it is not happening.
My doubt is My hoook class is not at all executing and after doing git push "http://xxxxx.git"
To check I used in my hook class like this
public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
{
return false
}
after this I dded and commited some files and now with git push "http://xxxxx.git" it is simply pushing the contents to the git.
I think my hook is not at all calling...how to check whether my hook class is getting call/working properly..
Regards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.