<div dir="ltr">I think what you are trying to achieve is to have a branch that tracks upstream for the upstream projects, and another branch that tracks local development in your Gerrit project.<div>You may want to check Jeepyb:</div><div><br></div><div><a href="http://ci.openstack.org/jeepyb.html">http://ci.openstack.org/jeepyb.html</a><br></div><div><br></div><div>That tool is what Openstack CI uses to manage gerrit repo creation.</div><div>Let's take as an example that you wanted to have python-neutronclient project in your Gerrit, that tracks upstream.</div><div><br></div><div>You would do something like this:</div><div><br></div><div>1. Install jeepyb and configure the projects.ini file according to your environment.</div><div>1. Add python-neutronclient.config file to the folder your manage-projects expect it to find (acl-dir parameter from previous step), with contents similar to :</div><div><br></div><div><div>[access "refs/heads/*"]                                                                                                                                                                                      </div><div>abandon = group neutron-core                                                                                                                                                                                 </div><div>label-Code-Review = -2..+2 group neutron-core                                                                                                                                                                </div><div>label-Workflow = -1..+1 group neutron-core                                                                                                                                                                   </div><div>                                                                                                                                                                                                             </div><div>[access "refs/heads/proposed/*"]                                                                                                                                                                             </div><div>abandon = group neutron-milestone                                                                                                                                                                            </div><div>label-Code-Review = -2..+2 group neutron-milestone                                                                                                                                                           </div><div>label-Workflow = -1..+1 group neutron-milestone                                                                                                                                                              </div><div>                                                                                                                                                                                                             </div><div>[access "refs/tags/*"]                                                                                                                                                                                       </div><div>pushSignedTag = group neutron-release                                                                                                                                                                        </div><div>                                                                                                                                                                                                             </div><div>[receive]                                                                                                                                                                                                    </div><div>requireChangeId = true                                                                                                                                                                                       </div><div>requireContributorAgreement = true                                                                                                                                                                           </div><div>                                                                                                                                                                                                             </div><div>[submit]                                                                                                                                                                                                     </div><div>mergeContent = true </div></div><div><br></div><div>2. Create an entry in gerrit/projects.yaml file from project-config repo like:</div><div><br></div><div><div>- project: openstack/python-neutronclient                                                                                                                                                                    </div><div>  upstream: <a href="https://git.openstack.org/openstack/python-neutronclient">https://git.openstack.org/openstack/python-neutronclient</a>                                                                                                                                         </div><div>  options:                                                                                                                                                                                                   </div><div>    - track-upstream  </div></div><div><br></div><div>3. Run 'manage-projects python-neutronclient'</div><div><br></div><div>After this, the tool would create the project 'python-neutronclient' with the acl defined from step 1 and set it to track upstream (as per the option depicted on step 2).</div><div>After this, you could just create branches off master from the Gerrit UI (or define them upfront in the acl in step 1, but this way would get you started faster).</div><div><br></div><div>If you use the upstream openstack_project::review.pp manifest the configuration to get this going is greatly reduced (it's a mega manifest that installs gerrit, jeepyb and other things), I can help you with that.</div><div><br></div><div>Regards</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-27 15:22 GMT+01:00 ZZelle <span dir="ltr"><<a href="mailto:zzelle@gmail.com" target="_blank">zzelle@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Ondrej,<br><br></div><div>Could you clarify your needs?<br><br></div><div>If you allow your devs to commit code on your local gerrit, <br>then your repo will differ from OpenStack one <br>and you might have merge troubles when you will resync your repo with OpenStack one<br></div><div>How will you handle them?<br><br><br></div><div>Cédric/ZZelle<br></div><div><br></div><div><br></div><div><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 27, 2014 at 12:24 PM, Ondrej Wisniewski <span dir="ltr"><<a href="mailto:ondrej.wisniewski@dektech.com.au" target="_blank">ondrej.wisniewski@dektech.com.au</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Riccardo<br>
      <br>
      thanks for pointers you provided. I had a look at the Gerrit
      replication feature and the description says:<br>
      "<i>Gerrit can automatically push any changes it makes to its
        managed Git
        repositories to another system.</i>"<br>
      <br>
      What I need would be exactly the opposite. I need to update the
      Gerrit managed Git repository with the upstream community Git
      repository.<br>
      How would I go about that?<br>
      <br>
      What I tried was defining the community repository as remote
      origin and then do "git remote update". This updates the remote
      references but doesn't update the local branches.<br>
      <br>
      Thanks, Ondrej<div><div><br>
      <br>
      On 10/24/2014 06:56 PM, Ricardo Carrillo Cruz wrote:<br>
    </div></div></div><div><div>
    <blockquote type="cite">
      <div dir="ltr">Hi Ondrej
        <div><br>
        </div>
        <div>The replication between Gerrit and git mirrors is done by
          the Gerrit replication mechanism.</div>
        <div><br>
        </div>
        <div>If you look at this line in the gerrit manifest:</div>
        <div><br>
        </div>
        <div><a href="http://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/gerrit/manifests/init.pp#n255" target="_blank">http://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/gerrit/manifests/init.pp#n255</a><br>
        </div>
        <div><br>
        </div>
        <div>you will see that it deploys a 'replication.config' file
          based on template:</div>
        <div><br>
        </div>
        <div><a href="http://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/gerrit/templates/replication.config.erb" target="_blank">http://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/gerrit/templates/replication.config.erb</a><br>
        </div>
        <div><br>
        </div>
        <div>You can find more information about how Gerrit replication
          works here:</div>
        <div><br>
        </div>
        <div><a href="http://gerrit.googlecode.com/svn/documentation/2.0/config-replication.html" target="_blank">http://gerrit.googlecode.com/svn/documentation/2.0/config-replication.html</a><br>
        </div>
        <div><br>
        </div>
        <div>HTH</div>
        <div><br>
        </div>
        <div>Regards</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2014-10-24 18:25 GMT+02:00 Ondrej
          Wisniewski <span dir="ltr"><<a href="mailto:ondrej.wisniewski@dektech.com.au" target="_blank">ondrej.wisniewski@dektech.com.au</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> <font face="Helvetica, Arial, sans-serif">Hi,<br>
                <br>
                I am trying to set up an OpenStack development workflow
                in our company. We have an internal Git repository
                mirror of all OpenStack projects we are working on. It
                is periodically updated from the upstream OpenStack
                community servers. This is used to share the code among
                developers. <br>
                <br>
                Furthermore I have set up a Gerrit server for the
                internal code review. The Gerrit server also works with
                repository mirrors of the community repositories which
                should be updated periodically. Or at least that's the
                idea. I ran into lots of problems and couldn't find a
                good way of synchronizing the developer mirrors with the
                Gerrit repositories. <br>
                <br>
                So to cut a long story short, here are my questions:<br>
                How is the synchronization of the OpenStack community
                Git repositories and the Gerrit server done? <br>
                How can I import an OpenStack project into my Gerrit
                system from my local Git mirror and keep both
                synchronized (at least the master branch) ?<br>
                <br>
                I would be really appreciate if someone could shed some
                light on this.<br>
                Thanks, Ondrej<br>
              </font> </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </div></div></div>

<br></div></div><span class="">_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>