gerrit integration

201 views
Skip to first unread message

David Michonneau

unread,
Apr 19, 2016, 9:10:35 AM4/19/16
to SmartGit
Could you add a feature for better gerrit integration? Currently, it is necessary to always push to... and specify ref/for/branchname in order to push to gerrit. It would be great to have a Push to Gerrit button or something similar.

Thanks,

David

syntevo Support

unread,
Apr 19, 2016, 10:16:35 AM4/19/16
to smar...@googlegroups.com
Can the presence of Gerrit and all necessary parameters be detected somehow from your local repository configuration? I'd prefer to not offer Push to Gerrit to users which do not even use Gerrit.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/7e1c0387-957d-40a6-beb6-a96eea9500fa%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

syntevo Support

unread,
Jun 6, 2016, 11:34:48 AM6/6/16
to jeppe.skovga...@gmail.com, smar...@googlegroups.com
> You could check for a hook (.git/hooks/commit-msg with the "# From Gerrit
> Code Review"... in it)

I like this approach most. I've added this to the RFE list (SG-10154).

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com



06/06/2016 15:30 - Jeppe Sørensen wrote:

> Hi,
>
> I would also like this feature,
>
> You could check for a hook (.git/hooks/commit-msg with the "# From Gerrit
> Code Review"... in it)
> Or you could simply make it a configuration option to setup the repository
> for gerrit commits.
> Push could be like described
> here
> https://gerrit-review.googlesource.com/Documentation/intro-user.html#upload-change
> Alternatively make it possible to configure a "push to" button with a
> preconfigured ref in the toolbar!
>
> Hope you add it!
>
> Thanks for a great tool!
> > > smartgit+u...@googlegroups.com <javascript:>.
> > > To post to this group, send email to smar...@googlegroups.com
> > <javascript:>.

Jeppe Sørensen

unread,
Jun 6, 2016, 1:03:07 PM6/6/16
to SmartGit, smar...@syntevo.com
Hi,

I would also like this feature,

You could check for a hook (.git/hooks/commit-msg with the "# From Gerrit Code Review"... in it)
Or you could simply make it a configuration option to setup the repository for gerrit commits.
Alternatively make it possible to configure a "push to" button with a preconfigured ref in the toolbar!

Hope you add it!

Thanks for a great tool!


syntevo Support

unread,
Jun 11, 2016, 5:20:40 AM6/11/16
to smar...@googlegroups.com
> You could check for a hook (.git/hooks/commit-msg with the "# From Gerrit
> Code Review"... in it)
> Or you could simply make it a configuration option to setup the repository
> for gerrit commits.
> Push could be like described
> here
> https://gerrit-review.googlesource.com/Documentation/intro-user.html#upload-change
> Alternatively make it possible to configure a "push to" button with a
> preconfigured ref in the toolbar!

I've now added "Push To Gerrit" to the Branches view context menu. Requirements: .git/hooks/commit-msg must exist and there must be a unique "Gerrit" remote: to detect the remote, SmartGit will iterate over all available remotes. If there is a remote with port 29418 (default SSH port), this will be the Gerrit remote. Otherwise, if there is exactly one remote, this will be the Gerrit remote. Otherwise, Push to Gerrit won't be available.

Push To Gerrit will simply push the selected <branch> to refs/for/<branch>.

To get this functionality: get 7.2 Preview from:

http://www.syntevo.com/smartgit/preview

and invoke Help|Check for Latest Build

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com



> > > smartgit+u...@googlegroups.com <javascript:>.
> > > To post to this group, send email to smar...@googlegroups.com
> > <javascript:>.
> > > To view this discussion on the web visit
> > >
> > https://groups.google.com/d/msgid/smartgit/7e1c0387-957d-40a6-beb6-a96eea9500fa%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/60649ef7-d5e5-49c9-b4d5-07fbf69e5d47%40googlegroups.com.

Stephan Leuschner

unread,
Jul 19, 2016, 7:43:04 AM7/19/16
to SmartGit, smar...@syntevo.com
Like I had stated before, this will limit the use of this feature.
We use SSH port 22, have more than 1 remote and possibly our own commit msg script.

So a configuration is essential, autodetect will fail.

Thanks!

syntevo Support

unread,
Jul 22, 2016, 4:01:01 AM7/22/16
to smar...@googlegroups.com
> Like I had stated before, this will limit the use of this feature.
> We use SSH port 22, have more than 1 remote and possibly our own commit msg
> script.

What would you think of adding an explicit option like the following for SmartGit's detection?

[remote "origin"]
url = ...
...
gerrit = true

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


> > https://groups.google.com/d/msgid/smartgit/60649ef7-d5e5-49c9-b4d5-07fbf69e5d47%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/b2443a0f-1ebd-41ce-bfba-77d8604435a4%40googlegroups.com.

David Michonneau

unread,
Aug 31, 2016, 10:52:19 AM8/31/16
to SmartGit, smar...@syntevo.com
Sounds like the best option to me. Could the default Push action push to gerrit in that case? There are other Push actions like "Push Commits" that would need to take this option into account as well. Eventually it would be nice to expose the configuration option with SmartGit Preferences UI.

Thanks,

David

David Michonneau

unread,
Sep 13, 2016, 9:10:34 AM9/13/16
to SmartGit, smar...@syntevo.com
I tried the new feature on SmartGit, however, it attemps to push to gerrit with the same branch name as the local branch. Let's say my local branch is called mybranch, and tracks the remote branch dev, it will try to push it to refs/for/mybranch, instead of refs/for/dev, which is what I need. So it makes the feature not usable. Could you please correct it for the next patch to automatically map the remote tracking branch name : refs/for/dev in my example?

Thank you,

David

Le vendredi 22 juillet 2016 10:01:01 UTC+2, syntevo Support a écrit :

syntevo Support

unread,
Sep 13, 2016, 10:29:15 AM9/13/16
to smar...@googlegroups.com
> I tried the new feature on SmartGit, however, it attemps to push to gerrit
> with the same branch name as the local branch. Let's say my local branch is
> called mybranch, and tracks the remote branch dev, it will try to push it
> to refs/for/mybranch, instead of refs/for/dev, which is what I need.

That sounds reasonable. I've scheduled this as RFE for version 8.1.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com



> > https://groups.google.com/d/msgid/smartgit/b2443a0f-1ebd-41ce-bfba-77d8604435a4%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/a409d27d-bd32-46b5-8426-c5ac08557850%40googlegroups.com.

syntevo Support

unread,
Dec 5, 2016, 1:33:24 PM12/5/16
to smar...@googlegroups.com
> > I tried the new feature on SmartGit, however, it attemps to push to gerrit
> > with the same branch name as the local branch. Let's say my local branch is
> > called mybranch, and tracks the remote branch dev, it will try to push it
> > to refs/for/mybranch, instead of refs/for/dev, which is what I need.
>
> That sounds reasonable. I've scheduled this as RFE for version 8.1.

It's implemented now in the latest build 9063 of SmartGit 8.1 (Preview): Help|Check for Latest Build (provided you are already running 8.1 Preview).

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


> https://groups.google.com/d/msgid/smartgit/1473776906.887706.496053734.21405.2%40smart.
Reply all
Reply to author
Forward
0 new messages