<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Ricardo,<br>
      <br>
      thanks a lot for your help and detailed instructions. It will
      surely come in handy when I will need to do something like that. I
      am looking also into this possibility.<br>
      <br>
      But the actual reason I need to sync our central developer repo
      with the Gerrit repo is a problem when the developer tries to
      submit code for review to Gerrit. Since the central developer repo
      is periodically updated from upstream and the developers pull
      these changes into their own local repos before branching off the
      feature branch, then this feature branch contains commits from
      upstream that Gerrit doesn't know about. So submitting this
      feature branch to code review will include lots of commits which
      are not the developers.<br>
      <br>
      I have now solved this issue by granting each developer the right
      to push the master branch to refs/heads/master in the Gerrit repo.
      This makes sure that the Gerrit repos master branch is updated
      with the latest commits and when the developer submits his feature
      branch for review, only his own commits will be reviewed.<br>
      <br>
      Regards, Ondrej<br>
      <br>
      <i>On 10/27/2014 05:11 PM, Ricardo Carrillo Cruz wrote:</i><i><br>
      </i></div>
    <blockquote
cite="mid:%3CCADe0dKAQPPNwA_10vjT1paQabhc3aE_2GWC3XsTQRSE=2QP9MQ@mail.gmail.com%3E"
      type="cite">
      <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 moz-do-not-send="true"
            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 moz-do-not-send="true"
              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>
    </blockquote>
  </body>
</html>