info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vendor branches, tracking sources and creating patches


From: Eric Siegerman
Subject: Re: Vendor branches, tracking sources and creating patches
Date: Wed, 20 Dec 2000 14:59:47 -0500
User-agent: Mutt/1.2.5i

On Wed, Dec 20, 2000 at 05:37:44PM -0000, Ross Burton wrote:
> [they need to use CVS to track the GCC distribution while
> making local changes]
>
> I think this can be achieved if we take, for example, gcc 2.95.2 and
> import into our tree as such:
> 
> tar zxvf gcc-2.95.2.tar.gz ; cd gcc-2.95.2
> cvs import -m "Import of GCC 2.95.2" gcc GNU GCC_2_95_2
> 
> We can work with this, adding files and editing and files which need
> to be changed.  When we need to make a diff between all of our changes
> and the original 2.95.2 source, I run:
> 
> cvs rdiff -r GCC_2_95_2 -r HEAD gcc

I'd recommend setting a release (ie. non-branch) tag when you do
this (also, use "-u" to make a patch that the GCC maintainers can
actually use):
        cvs rtag -r HEAD patches-submitted-20001220 gcc
        #
        # Don't use "-r HEAD" again in the "rdiff"; use the tag
        # you just created.  This closes a race condition;
        # someone might commit a new revision between these two
        # commands.
        #
        cvs rdiff -u -r GCC_2_95_2 -r patches-submitted-20001220 gcc

That way, the next time you want to submit patches, you can avoid
resubmitting the same ones again:
        cvs rtag -r HEAD patches-submitted-20010104 gcc
        cvs rdiff -u -r patches-submitted-20001220 -r 
patches-submitted-20010104 gcc

> I can also update the GCC sources when (haha) GCC 3.0 is released as
> such:
> 
> tar zxvf gcc-3.0.tar.gz ; cd gcc-3.0
> cvs import -m "Import of GCC 3.0" gcc GNU GCC_3_0
> 
> Then 'cvs checkout -j' can be used to merge any conflicts.
> 
> Is this correct?

Yes, but again, I tend to be paranoid and tag the thing up the wazoo:
        cd <my-gcc-sandbox>
        cvs update -A

        # Tag the state of the world before you began the merge
        cvs tag GCC_2_95_2_preupdate

        # Deal manually with files that have moved/disappeared
        # from the distribution between GCC 2.95.2 and 3.0.  This
        # may no longer be necessary; I haven't done much
        # vendor-branch work since several CVS versions ago.

        # Do the import
        cvs import -m "Import of GCC 3.0" gcc GNU GCC_3_0

        # Merge
        cvs update -j GCC_2_95_2 -j GCC_3_0
        # Resolve conflicts

        # Optionally: commit and tag
        cvs commit
        cvs tag GCC_3_0_merged_preliminary

        # Do some testing; fix any bugs you find that were
        # introduced by the merge

        # Decide that the merge is complete
        cvs tag GCC_3_0_merged

Good luck.

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Nobody ever got fired for buying Microsoft -- but they could get
fired for relying on Microsoft.
        - Chris Garrigues



reply via email to

[Prev in Thread] Current Thread [Next in Thread]