Skip to content

Commit

Permalink
RF - updated to latest gitwash docs and dumper
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Nov 24, 2010
1 parent 7eb3a78 commit 972c94f
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 109 deletions.
4 changes: 3 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ doctest:
"results in _build/doctest/output.txt."

gitwash-update:
python ../tools/gitwash_dumper.py source nibabel --github-user=nipy
python ../tools/gitwash_dumper.py source nibabel --github-user=nipy \
--project-url=http://nipy.org/nibabel \
--project-ml-url=http://mail.scipy.org/mailman/listinfo/nipy-devel

2 changes: 1 addition & 1 deletion doc/source/gitwash/configure_git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ Or from the command line::
git config --global merge.log true


.. include:: git_links.inc
.. include:: links.inc
14 changes: 7 additions & 7 deletions doc/source/gitwash/development_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Workflow summary
This way of working really helps to keep work well organized, and in
keeping history as clear as possible.

See - for example - `linux git workflow`_.
See |emdash| for example |emdash| `linux git workflow`_.

Making a new feature branch
===========================
Expand Down Expand Up @@ -87,22 +87,22 @@ In more detail
#. To commit all modified files into the local copy of your repo,, do
``git commit -am 'A commit message'``. Note the ``-am`` options to
``commit``. The ``m`` flag just signals that you're going to type a
message on the command line. The ``a`` flag - you can just take on
faith - or see `why the -a flag?`_ - and the helpful use-case description in
the `tangled working copy problem`_. The `git commit`_ manual
message on the command line. The ``a`` flag |emdash| you can just take on
faith |emdash| or see `why the -a flag?`_ |emdash| and the helpful use-case
description in the `tangled working copy problem`_. The `git commit`_ manual
page might also be useful.
#. To push the changes up to your forked repo on github_, do a ``git
push`` (see `git push`).

Asking for code review
======================

#. Go to your repo URL - e.g. ``http://github.com/your-user-name/nibabel``.
#. Go to your repo URL |emdash| e.g. ``http://github.com/your-user-name/nibabel``.
#. Click on the *Branch list* button:

.. image:: branch_list.png

#. Click on the *Compare* button for your feature branch - here ``my-new-feature``:
#. Click on the *Compare* button for your feature branch |emdash| here ``my-new-feature``:

.. image:: branch_list_compare.png

Expand Down Expand Up @@ -236,4 +236,4 @@ To see a linear list of commits for this branch::
You can also look at the `network graph visualizer`_ for your github_
repo.

.. include:: git_links.inc
.. include:: links.inc
2 changes: 1 addition & 1 deletion doc/source/gitwash/following_latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ From time to time you may want to pull down the latest code. Do this with::
The tree in ``nibabel`` will now have the latest changes from the initial
repository.

.. include:: git_links.inc
.. include:: links.inc
12 changes: 6 additions & 6 deletions doc/source/gitwash/forking_hell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Making your own copy (fork) of nibabel
==========================================

You need to do this only once. The instructions here are very similar
to the instructions at http://help.github.com/forking/ - please see that
page for more detail. We're repeating some of it here just to give the
to the instructions at http://help.github.com/forking/ |emdash| please see
that page for more detail. We're repeating some of it here just to give the
specifics for the nibabel_ project, and to suggest some default names.

Set up and configure a github_ account
======================================

If you don't have a github_ account, go to the github_ page, and make one.

You then need to configure your account to allow write access - see the
``Generating SSH keys`` help on `github help`_.
You then need to configure your account to allow write access |emdash| see
the ``Generating SSH keys`` help on `github help`_.

Create your own forked copy of nibabel_
=========================================
===========================================

#. Log into your github_ account.
#. Go to the nibabel_ github home at `nibabel github`_.
Expand All @@ -29,5 +29,5 @@ Create your own forked copy of nibabel_
Now, after a short pause and some 'Hardcore forking action', you
should find yourself at the home page for your own forked copy of nibabel_.

.. include:: git_links.inc
.. include:: links.inc

2 changes: 1 addition & 1 deletion doc/source/gitwash/git_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Have a look at the github_ install help pages available from `github help`_

There are good instructions here: http://book.git-scm.com/2_installing_git.html

.. include:: git_links.inc
.. include:: links.inc
2 changes: 1 addition & 1 deletion doc/source/gitwash/git_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ should get you started.

For general resources for learning git_ see :ref:`git-resources`.

.. include:: git_links.inc
.. include:: links.inc
32 changes: 2 additions & 30 deletions doc/source/gitwash/git_links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,6 @@
__not_case_sensitive__, so only one target definition is needed for
nipy, NIPY, Nipy, etc...
.. PROJECTNAME placeholders
.. _PROJECTNAME: http://neuroimaging.scipy.org
.. _`PROJECTNAME github`: http://github.com/nipy
.. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel

.. nipy
.. _nipy: http://nipy.org/nipy
.. _`nipy github`: http://github.com/nipy/nipy
.. _`nipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. ipython
.. _ipython: http://ipython.scipy.org
.. _`ipython github`: http://github.com/ipython/ipython
.. _`ipython mailing list`: http://mail.scipy.org/mailman/listinfo/IPython-dev

.. dipy
.. _dipy: http://nipy.org/dipy
.. _`dipy github`: http://github.com/Garyfallidis/dipy
.. _`dipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. nibabel
.. _nibabel: http://nipy.org/nibabel
.. _`nibabel github`: http://github.com/nipy/nibabel
.. _`nibabel mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. marsbar
.. _marsbar: http://marsbar.sourceforge.net
.. _`marsbar github`: http://github.com/matthew-brett/marsbar
.. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users

.. git stuff
.. _git: http://git-scm.com/
.. _github: http://github.com
Expand Down Expand Up @@ -80,3 +50,5 @@

.. other stuff
.. _python: http://www.python.org

.. |emdash| unicode:: U+02014
11 changes: 6 additions & 5 deletions doc/source/gitwash/git_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ Tutorials and summaries
* The `git user manual`_
* The `git tutorial`_
* The `git community book`_
* `git ready`_ - a nice series of tutorials
* `git casts`_ - video snippets giving git how-tos.
* `git magic`_ - extended introduction with intermediate detail
* `git ready`_ |emdash| a nice series of tutorials
* `git casts`_ |emdash| video snippets giving git how-tos.
* `git magic`_ |emdash| extended introduction with intermediate detail
* The `git parable`_ is an easy read explaining the concepts behind git.
* Our own `git foundation`_ expands on the `git parable`_.
* Fernando Perez' git page - `Fernando's git page`_ - many links and tips
* Fernando Perez' git page |emdash| `Fernando's git page`_ |emdash| many
links and tips
* A good but technical page on `git concepts`_
* `git svn crash course`_: git_ for those of us used to subversion_

Expand Down Expand Up @@ -55,4 +56,4 @@ online manual pages for some common commands:
* `git remote`_
* `git status`_

.. include:: git_links.inc
.. include:: links.inc
7 changes: 0 additions & 7 deletions doc/source/gitwash/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,3 @@ Contents:
git_resources


.. silence 'not included' warnings
.. toctree::
:hidden:

dot2_dot3


41 changes: 41 additions & 0 deletions doc/source/gitwash/known_projects.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. Known projects

.. PROJECTNAME placeholders
.. _PROJECTNAME: http://neuroimaging.scipy.org
.. _`PROJECTNAME github`: http://github.com/nipy
.. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel

.. numpy
.. _numpy: hhttp://numpy.scipy.org
.. _`numpy github`: http://github.com/numpy/numpy
.. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion

.. scipy
.. _scipy: http://www.scipy.org
.. _`scipy github`: http://github.com/scipy/scipy
.. _`scipy mailing list`: http://mail.scipy.org/mailman/listinfo/scipy-dev

.. nipy
.. _nipy: http://nipy.org/nipy
.. _`nipy github`: http://github.com/nipy/nipy
.. _`nipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. ipython
.. _ipython: http://ipython.scipy.org
.. _`ipython github`: http://github.com/ipython/ipython
.. _`ipython mailing list`: http://mail.scipy.org/mailman/listinfo/IPython-dev

.. dipy
.. _dipy: http://nipy.org/dipy
.. _`dipy github`: http://github.com/Garyfallidis/dipy
.. _`dipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. nibabel
.. _nibabel: http://nipy.org/nibabel
.. _`nibabel github`: http://github.com/nipy/nibabel
.. _`nibabel mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel

.. marsbar
.. _marsbar: http://marsbar.sourceforge.net
.. _`marsbar github`: http://github.com/matthew-brett/marsbar
.. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users
4 changes: 4 additions & 0 deletions doc/source/gitwash/links.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. compiling links file
.. include:: known_projects.inc
.. include:: this_project.inc
.. include:: git_links.inc
65 changes: 38 additions & 27 deletions doc/source/gitwash/patching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
Making a patch
================

You've discovered a bug or something else you want to change in nibabel_ - excellent!
You've discovered a bug or something else you want to change
in nibabel_ .. |emdash| excellent!

You've worked out a way to fix it - even better!
You've worked out a way to fix it |emdash| even better!

You want to tell us about it - best of all!
You want to tell us about it |emdash| best of all!

The easiest way is to make a *patch* or set of patches. Here we explain
how. Making a patch is the simplest and quickest, but if you're going
to be doing anything more than simple quick things, please consider
following the :ref:`git-development` model instead.
The easiest way is to make a *patch* or set of patches. Here
we explain how. Making a patch is the simplest and quickest,
but if you're going to be doing anything more than simple
quick things, please consider following the
:ref:`git-development` model instead.

.. _making-patches:

Expand Down Expand Up @@ -42,24 +44,28 @@ Overview
# make the patch files
git format-patch -M -C master

Then, send the generated patch files to the `nibabel mailing list`_ - where we will thank you warmly.
Then, send the generated patch files to the `nibabel
mailing list`_ |emdash| where we will thank you warmly.

In detail
---------

#. Tell git_ who you are so it can label the commits you've made::
#. Tell git_ who you are so it can label the commits you've
made::

git config --global user.email [email protected]
git config --global user.name "Your Name Comes Here"

#. If you don't already have one, clone a copy of the nibabel_ repository::
#. If you don't already have one, clone a copy of the
nibabel_ repository::

git clone git://github.com/nipy/nibabel.git
cd nibabel

#. Make a 'feature branch'. This will be where you work on your bug
fix. It's nice and safe and leaves you with access to an unmodified
copy of the code in the main branch::
#. Make a 'feature branch'. This will be where you work on
your bug fix. It's nice and safe and leaves you with
access to an unmodified copy of the code in the main
branch::

git branch the-fix-im-thinking-of
git checkout the-fix-im-thinking-of
Expand All @@ -74,16 +80,18 @@ In detail
# hack hack, hack
git commit -am 'BF - added fix for Funny bug'

Note the ``-am`` options to ``commit``. The ``m`` flag just signals
that you're going to type a message on the command line. The ``a``
flag - you can just take on faith - or see `why the -a flag?`_.
Note the ``-am`` options to ``commit``. The ``m`` flag just
signals that you're going to type a message on the command
line. The ``a`` flag |emdash| you can just take on faith |emdash|
or see `why the -a flag?`_.

#. When you have finished, check you have committed all your changes::
#. When you have finished, check you have committed all your
changes::

git status

#. Finally, make your commits into patches. You want all the commits
since you branched from the ``master`` branch::
#. Finally, make your commits into patches. You want all the
commits since you branched from the ``master`` branch::

git format-patch -M -C master

Expand All @@ -94,19 +102,21 @@ In detail

Send these files to the `nibabel mailing list`_.

When you are done, to switch back to the main copy of the code, just
return to the ``master`` branch::
When you are done, to switch back to the main copy of the
code, just return to the ``master`` branch::

git checkout master

Moving from patching to development
===================================

If you find you have done some patches, and you have one or more feature
branches, you will probably want to switch to development mode. You can
do this with the repository you have.
If you find you have done some patches, and you have one or
more feature branches, you will probably want to switch to
development mode. You can do this with the repository you
have.

Fork the nibabel_ repository on github_ - :ref:`forking`. Then::
Fork the nibabel_ repository on github_ |emdash| :ref:`forking`.
Then::

# checkout and refresh master branch from main repo
git checkout master
Expand All @@ -118,6 +128,7 @@ Fork the nibabel_ repository on github_ - :ref:`forking`. Then::
# push up any branches you've made and want to keep
git push origin the-fix-im-thinking-of

Then you can, if you want, follow the :ref:`development-workflow`.
Then you can, if you want, follow the
:ref:`development-workflow`.

.. include:: git_links.inc
.. include:: links.inc
2 changes: 1 addition & 1 deletion doc/source/gitwash/set_up_fork.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ Just for your own satisfaction, show yourself that you now have a new
origin [email protected]:your-user-name/nibabel.git (fetch)
origin [email protected]:your-user-name/nibabel.git (push)

.. include:: git_links.inc
.. include:: links.inc

3 changes: 3 additions & 0 deletions doc/source/gitwash/this_project.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. nibabel
.. _nibabel: http://nipy.org/nibabel
.. _`nibabel mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel
Loading

0 comments on commit 972c94f

Please sign in to comment.