[quagga-dev 11137] git repository rebasing (was: Re: bgpd IPv4 Encap SAFI, IPv6 VPN+ENCAP SAFIs)

David Lamparter equinox at opensourcerouting.org
Thu Mar 27 08:01:53 GMT 2014


[I'll copy the text of this mail to somewhere to keep around for future
need, please excuse the somewhat verbatim git explanations]

[Tom Goff: Cc'd because your NRL OSPF Google Code repository has the
same issue as below - please fix if possible, I'd like to take a look at
your OSPFv3 Address Families code at some point - ignore the resubmit
text]

On Wed, Mar 26, 2014 at 04:57:47PM -0400, Lou Berger wrote:
> Given the size of the change, the patch can also be found at 
> https://github.com/LabNConsulting/quagga-patches/commit/6a5300f3dbf4827b6f04414bd33ca6e6746b0af1

Since we're in release window right now, you'll have to resubmit this
once 0.99.23 is released.  (We went with explicitly rejecting patches
during the release window to make it absolutely obvious that during the
release window, we'd like as much support on review & testing as
possible.)

Also, for the git you've linked - the "import head" makes it useless.
It needs to be a clone of the master quagga git, so that git can use
parent relationships to help in the merging process.

You can fix this as follows:
On your local system where you have a checkout of your git:
-1. you don't need a backup since you're not changing any existing local
   git repository.  but you may still want to have a backup ;)
0. create a fresh clone of Quagga's git
    git clone git://git.sv.gnu.org/quagga.git quaggamaster
    cd quaggamaster
1. create a checkout of the base of quagga that you worked on
    git checkout -b base 01234567
   where 01234567 is the commit id of some point in the history of
   quagga.  you can use tagged versions here (run "git tag" to find
   names - the scheme changed a few times)
2. add your changes as a remote and fetch them
    git remote add changes /home/somebody/src/quagga
    git fetch changes
3. transfer over your commits:
    git rebase --onto base BASECOMMIT HEADCOMMIT
   where BASECOMMIT is the hash of the (topmost) import commit that
   contains code already in quagga, and HEADCOMMIT is the hash of the
   top of your changes, so that all your commits are inbetween.
   use hex IDs for both (unless you know what you're doing)

   if this step produces errors/unclean merges, you probably picked the
   wrong base commit in step 1.  delete everything and try again.

4. give a name to your result (you're now on a detached head)
    git checkout -b newbranchname
5. add your github repository as a remote and fetch:
    git remote add github git at github.com:LabNConsulting/quagga-patches.git
    git fetch github
6. push your new branch and remove now-deprecated old branches:
    git push github :oldbranchname
    git push github newbranchname:newpublicbranchname
7. have everyone that has a checkout of your old branch delete that and
   checkout the new branch.  Lou & Paul, you'll have to sync this
   between each other at least.

Step 7 is the reason I can't do this for you (along with not knowing the
base and not having the time for it).  You will need to go around all
your employees/contributors/contractors and tell them to move over to
the new git history.  If you have outstanding work, you can repeat above
process to transfer that over, replacing "base" from Quagga with your
newly pushed "newbranchname".


-David


> On March 26, 2014 1:53:42 PM "G. Paul Ziemba" <pz-quagga-dev at ziemba.us> wrote:
> > patch-vpn-encap-safis
> >
> >     bgpd,lib: bgpd IPv4 Encap SAFI, IPv6 VPN+ENCAP SAFIs
> >
> >     Description:
> > 	Add support for RFCs 4659 (IPv6 VPNs), 5512 (Encap SAFI),
> > 	5566 (IPSec Tunnel Encap), 4360 (add Opaque Extended Community).
> > 	A few cleanups for compiler warnings.
> >
> >     Author: G. Paul Ziemba <paulz at labn.net>





More information about the Quagga-dev mailing list