On 03/07/2011 09:36 AM, Jouni K. Seppänen wrote:
> I just wrote this as a response to a question on
> https://github.com/matplotlib/matplotlib/pull/32
> about how to merge to v1.0.x and master.
>
> Please feel free to comment or ask for details.
>
> ------------------------------------------------------------------------------
> First make sure your v1.0.x branch is fresh:
>
>      git checkout v1.0.x
>      git pull --ff-only upstream v1.0.x
>
> (This assumes an "upstream" remote pointing to
> `git://github.com/matplotlib/matplotlib.git`.) Then merge your pull

By default, however, if you have cloned from 
g...@github.com:matplotlib/matplotlib.git then instead of "upstream" the 
remote will be "origin".

Are you recommending and assuming that we clone *only* from our 
individual github forks, and then add the "upstream" remote to point to 
the official repo?

> request and run the test suite (I don't know if this should be
> mandatory):
>
>      git merge bugfix/legend_windowcall # replace by whatever you are merging
>      python setup.py install # or however you compile things to run the tests
>      ./tests.py # all new test runner script!
>
> If everything is fine, push:
>
>      git push g...@github.com:matplotlib/matplotlib.git v1.0.x

Can't this be simplified by using "origin" or "upstream" in place of the 
url?

>
> Next do the same with master, this time merging v1.0.x:
>
>      git checkout master
>      git pull --ff-only upstream master
>      git merge v1.0.x
>      python setup.py install
>      ./tests.py
>      git push g...@github.com:matplotlib/matplotlib.git master
> ------------------------------------------------------------------------------
>
> There are multiple ways things could go wrong, which will need
> instructions in the devel docs. These are the cases I can think of:
>
> 1. git pull --ff-only fails because fast-forward is impossible
>     (you have commits on an integration branch that don't belong there)
> 2. the merge has conflicts

I encountered that last night.  The conflict was a simple one that will 
occur often: the CHANGELOG needed to have the new entry prepended, so as 
to be at the top of the file, above new entries that were in master but 
not in v1.0.x.  Instructions for simplest case:

Edit the conflicted files, remembering to remove the conflict markers;
test as needed; use "git add" to add the resolved files (and any other 
files that needed to be changed to make the merge work) to the index, e.g.

     git add CHANGELOG

Then commit; a merge commit message will be generated, and can be edited 
as needed:

     git commit

Now you are ready to push.

> 3. the tests fail (also a kind of merge conflict, assuming the tests
>     passed before)
> 4. the push fails because fast-forward is impossible (someone has
>     pushed in the meantime)
> 5. v1.0.x doesn't merge cleanly into master

What do you mean by this?  What is the symptom?

Eric


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to