The official way to keep a Git repository in sync with a corresponding Bioconductor SVN repository is to make use of git-svn
after proper configuration. Such a Git repository can be hosted anywhere, including on GitHub.
These git-bioc
tools provides a set of Git commands that helps you keep the Git repository and the Bioconductor devel SVN repository in sync. They are meant to be intuitive and easy to remember.
These git-bioc
tools were designed with the following work process in mind:
- The Git repository is the main source of the Bioconductor package.
- Since the Git repository is the main source, you should as far aa possible strive to make all commits to Git.
- When you think the updates are ready to go live on Bioconductor, then should be committed there:
- Committing to the Bioconductor devel SVN repository takes place in two steps: (i)
git bioc export
followed by (ii)git bioc push
). Any Git-Bioc SVN conflicts have to be resolved in the first step. - After committing, Bioconductor will, on a daily basis, take a snapshot of your and all other Bioconductor packages, build them and check them. When all packages are completed, updated packages are made available via the Bioconductor package repository. At this time, the corresponding Bioc devel package pages are also updated. Thus, it may take a day or two before your
git bioc push
goes live.
- Committing to the Bioconductor devel SVN repository takes place in two steps: (i)
- At times there will be updates committed directly to the Bioconductor SVN (which were not committed to your Git repository first). This happens when the version of the Bioc package is bumped in preparation of a new major Bioconductor release (twice a year). It may also happen when Bioconductor core developers find it necessary to make direct adjustments to your package. It may also happen if you or one of your collaborators by mistake commit to the Bioconductor SVN instead of the Git repository.
- When this happens, you need to import such Bioc-only updates into the Git repository which takes place in two steps: (i)
git bioc pull
followed by (ii)git bioc import
. Any Git-Bioc SVN conflicts have to be resolved in the second step.
- When this happens, you need to import such Bioc-only updates into the Git repository which takes place in two steps: (i)
Note that all synchronization via your Git repository and Bioconductor SVN is done by you locally via these git-bioc
tools. Online repositories such as GitHub are not involved in this synchronization. They are only used to host your Git repository online.
IMPORTANT ABOUNT THE CURRENT IMPLEMENTATION:
I developed git-bioc mainly for my own needs, because I couldn't remember all failed to remember all the steps in the official Bioconductor Git Mirror instructions. More importantly, all the packages I've used git-bioc
for - affxparser, aroma.light and illuminaio - were previously using the Bioconductor 'Git-SVN bridge' (deprecated and removed on 2016-01-29). Any Bioconductor package that used this 'Git-SVN bridge' is likely to have a "non-linear" Git history / tree, which complicates our synchronization. The current implementation of the git-bioc
tools handles this problem by:
- Exporting to Bioc SVN: All Git commits are incorporated into a single Bioconductor SVN commit. The SVN commit message is currently not that informative.
- Importing from Bioc SVN: All Bioconductor SVN commits are incorporated into a single Git commit. The Git commit message is currently not that informative.
If your package didn't use the Git-SVN bridge in the past, the above / the current importation may not be optimal for you!
WARNING: Did you read the previous paragraph? It is very important! Make sure you understand it.
To use the git bioc
tools, change to the directory of your Bioconductor package and run the following once per package / repository:
git bioc init
This will setup bioc/devel
and bioc/release-x.y
branches and bind them to the remote Bioconductor SVN branches.
To get an overview of the repository and its branches, do:
$ git bioc info
*** Bioconductor GitHub-SVN Bridge history (master branch):
Switched to branch 'master'
- YES (contains commits by Bioconductor GitHub-SVN Bridge - [email protected])
*** Bioconductor SVN URLs:
svn-remote.devel.url=https://hedgehog.fhcrc.org/bioconductor//trunk/madman/Rpacks/illuminaio
svn-remote.release-3.0.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_0/madman/Rpacks/illuminaio
svn-remote.release-3.1.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_1/madman/Rpacks/illuminaio
svn-remote.release-3.2.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_2/madman/Rpacks/illuminaio
svn-remote.release-3.3.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_3/madman/Rpacks/illuminaio
*** Git-SVN branch tree:
* 5158646 (git-svn-devel, bioc/master, bioc/devel) bump version after creating 3.3 branch
* 27180e1 Bump versions prior to creation of 3.3 branch
* 3b02bbd Commit made by the Bioconductor Git-SVN bridge.
* 836448e Commit made by the Bioconductor Git-SVN bridge.
* a11385d Bumped version number of all packages after creation of 3.2 branch.
* 617cf7e Bumped versions of all packages prior to creating 3.2 branch.
* 8f4e390 Commit made by the Bioconductor Git-SVN bridge.
* b3be4a2 Commit made by the Bioconductor Git-SVN bridge.
* e5d5193 Commit made by the Bioconductor Git-SVN bridge.
* 67b5048 Commit made by the Bioconductor Git-SVN bridge.
To update the local bioc/devel
branch with what is on the Bioconductor SVN server, do:
$ git bioc pull
To update the local master
branch with updates on the local bioc/devel
branch, do:
$ git bioc import
To update the local bioc/devel
branch with updates on the local master
branch, do:
$ git bioc export
[...]
To push (formally svn commit) the local bioc/devel
branch to the Bioconductor SVN server, do:
$ git bioc push
Switched to branch 'bioc/devel'
Your branch is up-to-date with 'bioc/master'.
Committing to https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/illuminaio ...
[...]
To use the git bioc
commands, place all git-bioc*
files on the PATH
. For instance, if you have ~/bin/
on the PATH
, then copy them there:
git clone https://github.com/HenrikBengtsson/git-bioc.git
cp git-bioc/bin/git-bioc* ~/bin/
chmod ugo+x ~/bin/git-bioc*
After this, you can verify the installation as:
$ git bioc
usage: git bioc <subcommand>
Available subcommands are:
export Copies updates from master branch to bioc/devel.
import Cherry-picks commits from bioc/devel into master branch.
info Show information about Bioconductor devel SVN.
init Initialize a new git bioc repo.
pull Update branch bioc/devel with devel on Bioconductor SVN server.
push Commit bioc/devel updates to Bioconductor SVN server.