Revision: 7957
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7957&view=rev
Author: astraw
Date: 2009-11-12 22:17:24 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
docs: update git guide
Modified Paths:
--------------
trunk/matplotlib/doc/devel/coding_guide.rst
Modified: trunk/matplotlib/doc/devel/coding_guide.rst
===================================================================
--- trunk/matplotlib/doc/devel/coding_guide.rst 2009-11-12 20:53:36 UTC (rev
7956)
+++ trunk/matplotlib/doc/devel/coding_guide.rst 2009-11-12 22:17:24 UTC (rev
7957)
@@ -166,15 +166,14 @@
~~~~~~~~~~~~~~~~~~~~~~
There is an experimental `matplotlib github mirror`_ of the subversion
-repository. To make a local clone of it in the directory ``mpl.git``,
+repository. To make a local clone of it in the directory ``matplotlib``,
enter the following commands::
+ # Download the entire git repository into "matplotlib", name the source
repository "svn".
+ git clone --origin svn [email protected]:astraw/matplotlib.git
- # Download the entire git repository into "mpl.git", name the source
repository "svn".
- git clone --origin svn [email protected]:astraw/matplotlib.git mpl.git
-
# Change into the newly created git repository.
- cd mpl.git
+ cd matplotlib
# Setup the subversion mirroring.
git svn init --trunk=trunk/matplotlib --prefix=svn/
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
@@ -187,12 +186,16 @@
To install from this cloned repository, use the commands in the
:ref:`svn installation <install-svn>` section::
- > cd mpl.git
+ > cd matplotlib
> python setup.py install
-Using git
-~~~~~~~~~
+Note that it is not possible to interact with the matplotlib
+maintenance branches through git due to different representations of
+source code repositories in svnmerge and git.
+An example git workflow
+~~~~~~~~~~~~~~~~~~~~~~~
+
The following is a suggested workflow for git/git-svn.
Start with a virgin tree in sync with the svn trunk on the git branch
@@ -227,11 +230,64 @@
git checkout whizbang-branch
git rebase trunk
-Working on a maintenance branch from git
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+How was this git mirror set up?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The matplotlib maintenance branches are not available through git.
+These are notes for those interested in mirroring a subversion
+repository on github. I pieced this together by lots of
+trial-and-error.
+Step 1: Create a local mirror of the svn repository
+
+::
+
+ rsync -avzP rsync://matplotlib.svn.sourceforge.net/svn/matplotlib/
matplotlib-svn-rsync/
+
+Step 2: Import the svn history into a new git repository
+
+::
+
+ #!/bin/bash
+ set -e
+
+ TARGET=mpl.git.fixed
+ GIT=/home/astraw/git/bin/git
+ TRUNKBRANCH=trunk
+ SVNBRANCHPREFIX="svn/"
+
+ rm -rf $TARGET
+ mkdir $TARGET
+ cd $TARGET
+
+ $GIT init
+ $GIT svn init
--rewrite-root=https://matplotlib.svn.sourceforge.net/svnroot/matplotlib \
+ --trunk=trunk/matplotlib --prefix=$SVNBRANCHPREFIX
file:///mnt/workdisk/tmp/matplotlib-svn-rsync
+ $GIT svn fetch
+
+ # now, make master branch track ${SVNBRANCHPREFIX}trunk
+ $GIT checkout master -b tmp
+ $GIT branch -d master
+ $GIT checkout ${SVNBRANCHPREFIX}trunk -b $TRUNKBRANCH
+ $GIT branch -D tmp
+ $GIT svn rebase -l
+
+Step 3: Upload the git repository to github
+
+::
+
+ #!/bin/bash
+ set -e
+
+ TARGET=mpl.git.fixed
+ GIT=/home/astraw/git/bin/git
+ TRUNKBRANCH=trunk
+ SVNBRANCHPREFIX="svn/"
+
+ cd $TARGET
+
+ $GIT remote add github [email protected]:astraw/matplotlib.git
+ git push github $TRUNKBRANCH:master
+
.. _style-guide:
Style guide
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins