@@ -169,15 +169,18 @@ There is an experimental `matplotlib github mirror`_ of the subversion
169169repository. To make a local clone of it in the directory ``mpl.git ``,
170170enter the following commands::
171171
172- # This will create your copy in the mpl.git directory
173- git clone git://github.com/astraw/matplotlib.git mpl.git
172+
173+ # Download the entire git repository into "mpl.git", name the source repository "svn".
174+ git clone --origin svn [email protected] :astraw/matplotlib.git mpl.git 175+
176+ # Change into the newly created git repository.
174177 cd mpl.git
175- git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
176- git fetch
177- git svn init --branches=branches --trunk=trunk/matplotlib --tags=tags https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
178178
179- # Now just get the latest svn revisions from the SourceForge SVN repository
180- git svn fetch -r 6800:HEAD
179+ # Setup the subversion mirroring.
180+ git svn init --trunk=trunk/matplotlib --prefix=svn/ https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
181+
182+ # Tell git svn to analyze the subversion history
183+ git svn rebase -l
181184
182185.. _matplotlib github mirror : http://github.com/astraw/matplotlib
183186
@@ -193,9 +196,9 @@ Using git
193196The following is a suggested workflow for git/git-svn.
194197
195198Start with a virgin tree in sync with the svn trunk on the git branch
196- "master "::
199+ "trunk "::
197200
198- git checkout master
201+ git checkout trunk
199202 git svn rebase
200203
201204To create a new, local branch called "whizbang-branch"::
@@ -209,72 +212,25 @@ Do make commits to the local branch::
209212 git commit -m "modified a bunch of files"
210213 # repeat this as necessary
211214
212- Now, go back to the master branch and append the history of your branch
213- to the master branch, which will end up as the svn trunk::
215+ Now, go back to the trunk branch and append the history of your branch
216+ to the git trunk branch, which will end up as the svn trunk::
214217
215- git checkout master
218+ git checkout trunk
216219 git svn rebase # Ensure we have most recent svn
217- git rebase whizbang-branch # Append whizbang changes to master branch
220+ git rebase whizbang-branch # Append whizbang changes to trunk branch
218221 git svn dcommit -n # Check that this will apply to svn
219222 git svn dcommit # Actually apply to svn
220223
221224Finally, you may want to continue working on your whizbang-branch, so
222- rebase it to the new master ::
225+ rebase it to the new trunk ::
223226
224227 git checkout whizbang-branch
225- git rebase master
226-
227- If you get the dreaded "Unable to determine upstream SVN information
228- from working tree history" error when running "git svn rebase", try
229- creating a new git branch based on subversion trunk and cherry pick
230- your patches onto that::
231-
232- git checkout -b work remotes/trunk # create a new "work" branch
233- git cherry-pick <commit> # where <commit> will get applied to new branch
228+ git rebase trunk
234229
235230Working on a maintenance branch from git
236231~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237232
238- The matplotlib maintenance branches are also available through git.
239- (Note that the ``git svn init `` line in the instructions above was
240- updated to make this possible. If you created your git mirror without
241- a ``--branches `` option, you will need to perform all of the steps
242- again in a new directory).
243-
244- You can see which branches are available with::
245-
246- git branch -a
247-
248- To switch your working copy to the 0.98.5 maintenance branch::
249-
250- git checkout v0_98_5_maint
251-
252- Then you probably want to (as above) create a new local branch based
253- on that branch::
254-
255- git checkout -b whizbang-branch
256-
257- When you ``git svn dcommit `` from a maintenance branch, it will commit
258- to that branch, not to the trunk.
259-
260- While it should theoretically be possible to perform merges from a git
261- maintenance branch to a git trunk and then commit those changes back
262- to the SVN trunk, I have yet to find the magic incantation to make
263- that work. However, svnmerge as described `above <svn-merge >`_ can be
264- used and in fact works quite well.
265-
266- A note about git write access
267- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
268-
269- The matplotlib developers need to figure out if there should be write
270- access to the git repository. This implies using the personal URL
271- (``
[email protected] :astraw/matplotlib.git``) rather than the public URL
272- (``git://github.com/astraw/matplotlib.git ``) for the
273- repository. However, doing so may make life complicated in the sense
274- that then there are two writeable matplotlib repositories, which must
275- be synced to prevent divergence. This is probably not an
276- insurmountable problem, but it is a problem that the developers should
277- reach a consensus about. Watch this space...
233+ The matplotlib maintenance branches are not available through git.
278234
279235.. _style-guide :
280236
0 commit comments