GitMigration

From Biopython
(Difference between revisions)
Jump to: navigation, search
(Information on migrating to git)
 
m (Link to git page)
 
(35 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Migration from CVS to Git =
+
We have recently migrated to git distributed version control (instead of [[CVS]]), as summarised [[git|here]].
  
We are currently testing the benefits of migration to git distributed version control.
+
The process of development of Biopython with git is outlined [[GitUsage|here]].
  
Currently we have a git repository hosted at github.com:
+
This page contains the information on the technicalities of the transition itself and how the core developers should deal with the changes during the transitional period.
  
http://github.com/biopython/biopython/
+
= Current setup =
  
This is the official branch, it's synchronized with the main CVS trunk every hour, so it should be up to date most of the time.
+
[http://github.com/ GitHub] currently hosts the Biopython Git repository at http://github.com/biopython/biopython/
  
All developers and potential contributors are encouraged to try out this repository.  
+
This could become the official repository. Currently it is synchronized with the main [[CVS]] trunk every hour, so it should be up to date most of the time.
  
Below you can find rudimentary instructions on how to develop biopython with git.
+
== Updates from CVS to github branch ==
  
 +
The updates are done with the [http://cvs2svn.tigris.org/ cvs2svn] tool in the [http://cvs2svn.tigris.org/cvs2git.html cvs2git] mode.
  
== Installing git ==
+
This works by extracting commits from the cvs repo and generating input for [http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html git fast-import]. It seems to work nicely and is really fast.
  
First, you need to have git installed on your computer.  
+
The updates are performed hourly, using the following configuration [http://bartek.rezolwenta.eu.org/biopython_git_update/].
 +
The scripts obtains the cvs repository via rsync and performs the conversion locally. This has to be done this way at least until we get git installed on dev.open-bio.org.
  
Git (http://git-scm.com/) is now available for  all major operating systems, you can get it  
+
After the conversion is done, the updated git branch is pushed to github, so that others can use it. Afterwards, the copy of the git repo is rsynced back to OBF servers for backup purposes.
* Linux: Git is now packaged in all major linux distributions, you should find it in your package manager.
+
* Mac OS X: http://code.google.com/p/git-osx-installer/
+
* Windows: There are two options:  [[MsysGit][http://code.google.com/p/msysgit/]] or running the compiled git under Cygwin. You can find more information in [[this github guide][http://github.com/guides/using-git-and-github-for-the-windows-for-newbies]]
+
  
  
== Getting a github account (Optional) ==
+
== Accepting code contributions ==
  
* create an account on github.com.
+
During the migration, the CVS repo is assumed to be still of higher priority. This means that all code contributions need to go through CVS and then get updated to the github branch. This effectively means, we cannot push to the main biopython branch directly, but instead work on different branches and generate diffs to be applied to CVS.  
* Upload an ssh public key by clicking on 'account' after having logged in.
+
  
It is not mandatory to use github, but it will help you understanding
+
In case of small bug fixes, the core developers can continue to work directly in CVS. The changes will get pushed to github eventually.
how git works, and it allows other people to follow your branches and
+
your work.
+
  
== Getting the source
+
Since we also want to accept contributions through github, it means that core developer integrating changes will need to do some extra work:
 +
* make sure you have an updated version of cvs source tree
 +
* make sure you have a git repo with the official and contributed branch
 +
* make a diff between the contributed and official branch in git repo (see [[GitUsage]])
 +
* apply this diff to the cvs repository
 +
* commit in cvs with appropriate message
  
- go to the biopython repo:
 
http://github.com/biopython/biopython/tree/master
 
and you will see a button named 'Fork': click on it.
 
It will create a fork of the official biopython repository your
 
personal account.
 
Here the word 'fork' is not used in the common way it is, but just to
 
indicate that you are going to work on a modified version of the
 
official code, and it's not even a git command.
 
  
 +
== Next steps ==
  
- now, install git on your computer, and execute the following commands:
+
Once we reach a consensus that git/github serves us well. We will make the final switch. This would include:
$: git clone git@github.com:<your username>/biopython.git
+
* dropping the cvs support (updating Biopython webpage)
$: git remote add official_dist git://github.com/biopython/biopython.git
+
* shutting down the cvs2git update scripts
 
+
* installing git on the open-bio servers
With the first command, you will download a copy of the repository on
+
* setting up a synchronization between obf-hosted branch and github branch
your local computer, which will be the one you will modify
+
* posting an announcement on the dev-mailing list, news server, and twitter account to celebrate!
(technically, you are creating a new branch on your computer).
+
With the second command, you are adding a reference to the official
+
biopython repository, so in the future you will be able to easily
+
import the official code and compare it with yours.
+
 
+
Here it is an explanation on these two commands:
+
http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
+

Latest revision as of 12:23, 24 September 2009

We have recently migrated to git distributed version control (instead of CVS), as summarised here.

The process of development of Biopython with git is outlined here.

This page contains the information on the technicalities of the transition itself and how the core developers should deal with the changes during the transitional period.

Contents

Current setup

GitHub currently hosts the Biopython Git repository at http://github.com/biopython/biopython/

This could become the official repository. Currently it is synchronized with the main CVS trunk every hour, so it should be up to date most of the time.

Updates from CVS to github branch

The updates are done with the cvs2svn tool in the cvs2git mode.

This works by extracting commits from the cvs repo and generating input for git fast-import. It seems to work nicely and is really fast.

The updates are performed hourly, using the following configuration [1]. The scripts obtains the cvs repository via rsync and performs the conversion locally. This has to be done this way at least until we get git installed on dev.open-bio.org.

After the conversion is done, the updated git branch is pushed to github, so that others can use it. Afterwards, the copy of the git repo is rsynced back to OBF servers for backup purposes.


Accepting code contributions

During the migration, the CVS repo is assumed to be still of higher priority. This means that all code contributions need to go through CVS and then get updated to the github branch. This effectively means, we cannot push to the main biopython branch directly, but instead work on different branches and generate diffs to be applied to CVS.

In case of small bug fixes, the core developers can continue to work directly in CVS. The changes will get pushed to github eventually.

Since we also want to accept contributions through github, it means that core developer integrating changes will need to do some extra work:

  • make sure you have an updated version of cvs source tree
  • make sure you have a git repo with the official and contributed branch
  • make a diff between the contributed and official branch in git repo (see GitUsage)
  • apply this diff to the cvs repository
  • commit in cvs with appropriate message


Next steps

Once we reach a consensus that git/github serves us well. We will make the final switch. This would include:

  • dropping the cvs support (updating Biopython webpage)
  • shutting down the cvs2git update scripts
  • installing git on the open-bio servers
  • setting up a synchronization between obf-hosted branch and github branch
  • posting an announcement on the dev-mailing list, news server, and twitter account to celebrate!
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox