--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
There is a way of using it on existing repos:a) Use Gerrit as first-point of contact for pushb) Use Gerrit for code-reviewc) Configure replication from Gerrit to existing reposd) Keep on using the existing repos for pulls / fetchSee an example on how we do this with GitHub at:
On 2 Jun 2016, at 20:33, Jonathan Nieder <j...@google.com> wrote:Luca Milanesio wrote:There is a way of using it on existing repos:a) Use Gerrit as first-point of contact for pushb) Use Gerrit for code-reviewc) Configure replication from Gerrit to existing reposd) Keep on using the existing repos for pulls / fetchSee an example on how we do this with GitHub at:Yep, I've seen this kind of workflow work well.
On 2 Jun 2016, at 21:00, Gaurav Negi <gaura...@gmail.com> wrote:Luca, this way is sort of Gerrit hosting GIT at repos.Just that GIT repos (inside Gerrit) are replicated outside Gerrit also.I think the original question was GIT repos are outside Gerrit and opt-in way for Gerrit to be used just for code review.
On 2 Jun 2016, at 21:17, Rafał Wołoszyn <woloszy...@gmail.com> wrote:So generally it is possible. Only one disadvantage of this approach is that source code will be duplicated,
in Gerrit repo an external one.Since people already using it approach so maybe it will be nice to have that kind of feature in Gerrit to choose which repo will be used duringGerrit installation ?
On Thursday, 2 June 2016 19:26:53 UTC+2, Rafał Wołoszyn wrote:Hi all,As far as I know Gerit uses its own Git repository, is it possible to use Gerrit only as review tool with external repository ?Best regards,Rafal
--
Luca Milanesio wrote:There is a way of using it on existing repos:a) Use Gerrit as first-point of contact for pushb) Use Gerrit for code-reviewc) Configure replication from Gerrit to existing reposd) Keep on using the existing repos for pulls / fetchSee an example on how we do this with GitHub at:Yep, I've seen this kind of workflow work well.Gerrit wants to be the only user that writes to the branch it controls (although it can tolerate some pushes behind its back to the repository on the same machine). It is acting like a human maintainer, so to speak.What if the existing repo is controlled by a completely separate project? you might ask. E.g. what if you want to use Gerrit to develop a patched Linux kernel (the Linux kernel open source project doesn't use gerrit)? I've seen two approaches:a. Replicate the existing repo to a machine running Gerrit. Using Gerrit for code review, but don't ever Submit --- instead, once the patch is in good shape, send it upstream and click Abandon in Gerrit.
b. Replicate refs/heads/master from the existing repo to refs/heads/upstream on a machine running Gerrit. Use Gerrit as usual to develop refs/heads/master. When you want to pull in the latest changes from upstream, rungit fetch origingit checkout origin/mastergit pull origin upstreamgit push origin HEAD:refs/for/master
This creates a change representing your intent to get the latest changes from upstream. The diff represent any changes you made to the automatic merge --- in other words, it says how you resolved conflicts --- so the diff will usually be empty. The change can be reviewed and submitted as usual to incorporate the latest upstream changes into master.Hope that helps,Jonathan
--