~ubuntu-branches/ubuntu/wily/nibabel/wily-proposed

« back to all changes in this revision

Viewing changes to doc/source/gitwash/maintainer_workflow.rst

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2012-05-06 12:58:22 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120506125822-3jiwjkmdqcxkrior
Tags: 1.2.0-1
* New upstream release: bugfixes, support for new formats
  (Freesurfer, ECAT, etc), nib-ls tool.
* debian/copyright
  - corrected reference to the format specs
  - points to github's repository as the origin of sources
  - removed lightunit license/copyright -- removed upstream
  - added netcdf module license/copyright terms
* debian/control
  - added python-fuse to Recommends and Build-Depends for dicomfs
  - boosted policy compliance to 3.9.3 (no further changes)
* debian/watch
  - adjusted to download numbered tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _maintainer-workflow:
 
2
 
 
3
###################
 
4
Maintainer workflow
 
5
###################
 
6
 
 
7
This page is for maintainers |emdash| those of us who merge our own or other
 
8
peoples' changes into the upstream repository.
 
9
 
 
10
Being as how you're a maintainer, you are completely on top of the basic stuff
 
11
in :ref:`development-workflow`.
 
12
 
 
13
The instructions in :ref:`linking-to-upstream` add a remote that has read-only
 
14
access to the upstream repo.  Being a maintainer, you've got read-write access.
 
15
 
 
16
It's good to have your upstream remote have a scary name, to remind you that
 
17
it's a read-write remote::
 
18
 
 
19
    git remote add upstream-rw git@github.com:nipy/nibabel.git
 
20
    git fetch upstream-rw
 
21
 
 
22
*******************
 
23
Integrating changes
 
24
*******************
 
25
 
 
26
Let's say you have some changes that need to go into trunk
 
27
(``upstream-rw/master``).
 
28
 
 
29
The changes are in some branch that you are currently on.  For example, you are
 
30
looking at someone's changes like this::
 
31
 
 
32
    git remote add someone git://github.com/someone/nibabel.git
 
33
    git fetch someone
 
34
    git branch cool-feature --track someone/cool-feature
 
35
    git checkout cool-feature
 
36
 
 
37
So now you are on the branch with the changes to be incorporated upstream.  The
 
38
rest of this section assumes you are on this branch.
 
39
 
 
40
A few commits
 
41
=============
 
42
 
 
43
If there are only a few commits, consider rebasing to upstream::
 
44
 
 
45
    # Fetch upstream changes
 
46
    git fetch upstream-rw
 
47
    # rebase
 
48
    git rebase upstream-rw/master
 
49
 
 
50
Remember that, if you do a rebase, and push that, you'll have to close any
 
51
github pull requests manually, because github will not be able to detect the
 
52
changes have already been merged.
 
53
 
 
54
A long series of commits
 
55
========================
 
56
 
 
57
If there are a longer series of related commits, consider a merge instead::
 
58
 
 
59
    git fetch upstream-rw
 
60
    git merge --no-ff upstream-rw/master
 
61
 
 
62
The merge will be detected by github, and should close any related pull requests
 
63
automatically.
 
64
 
 
65
Note the ``--no-ff`` above.  This forces git to make a merge commit, rather than
 
66
doing a fast-forward, so that these set of commits branch off trunk then rejoin
 
67
the main history with a merge, rather than appearing to have been made directly
 
68
on top of trunk.
 
69
 
 
70
Check the history
 
71
=================
 
72
 
 
73
Now, in either case, you should check that the history is sensible and you have
 
74
the right commits::
 
75
 
 
76
    git log --oneline --graph
 
77
    git log -p upstream-rw/master..
 
78
 
 
79
The first line above just shows the history in a compact way, with a text
 
80
representation of the history graph. The second line shows the log of commits
 
81
excluding those that can be reached from trunk (``upstream-rw/master``), and
 
82
including those that can be reached from current HEAD (implied with the ``..``
 
83
at the end). So, it shows the commits unique to this branch compared to trunk.
 
84
The ``-p`` option shows the diff for these commits in patch form.
 
85
 
 
86
Push to trunk
 
87
=============
 
88
 
 
89
::
 
90
 
 
91
    git push upstream-rw my-new-feature:master
 
92
 
 
93
This pushes the ``my-new-feature`` branch in this repository to the ``master``
 
94
branch in the ``upstream-rw`` repository.
 
95
 
 
96
.. include:: links.inc