Difference between revisions of "WormBase Source Code"

From WormBaseWiki
Jump to navigationJump to search
Line 33: Line 33:
  
 
Be sure to see the excellent [http://hgbook.red-bean.com/ Mercurial reference text].
 
Be sure to see the excellent [http://hgbook.red-bean.com/ Mercurial reference text].
 +
 +
Here's a great tutorial on [http://blogs.sun.com/tor/entry/mercurial_tip_checking_in_regularly managing complex commits and merges] using a triple-repository strategy.
  
 
==Pulling in Changes and Updates==
 
==Pulling in Changes and Updates==

Revision as of 16:34, 21 November 2009

The WormBase source code is maintained using the distributed SCM system Mercurial. We use BitBucket.org as a convenient place to host the code and track issues:

http://bitbucket.org/tharris/wormbase/

Available Repositories

http://bitbucket.org/tharris/wormbase - The WormBase web application (public)

http://bitbucket.org/tharris/wormbase-admin - Administration code (private)

Get Mercurial

http://www.selenic.com/mercurial/wiki/

Set up your environment

Minimally, create a file at ~/.hgrc containing:

[ui]
username=First Last <email@example.net>

Checking out the code

The following examples all use Mercurial over http. You can also use mercurial over ssh.

cd ~/projects
$ hg clone http://bitbucket.org/tharris/wormbase/

Or via https:

$ hg clone https://username@bitbucket.org/tharris/wormbase

Working With Mercurial

Be sure to see the excellent Mercurial reference text.

Here's a great tutorial on managing complex commits and merges using a triple-repository strategy.

Pulling in Changes and Updates

$ hg pull -u 

Pushing Changes to the Repository

$ hg push

Reference: Migrating to Mercurial

After creating the repository on BitBucket, I cloned it and populated with a exported version of source from SVN.

$ hg clone http://bitbucket.org/harris/wormbase
$ mv ~/wormbase.svn/* wormbase/.

# Add and commit the files
$ hg add
$ hg commit -m 'Initial import of my old svn repository'

# Push the changes back to BitBucket
$ hg push


Reference: Migrating to git

Global setup:

 Download and install Git: http://git-scm.com/download
 git config --global user.name "Your Name"
 git config --global user.email info@tharris.org
       

Next steps:

 mkdir wormbase-app
 cd wormbase-app
 git init
 touch README
 git add README
 git commit -m 'first commit'
 git remote add origin git@github.com:tharris/wormbase-app.git
 git push origin master
     

Existing Git Repo?

 cd existing_git_repo
 git remote add origin git@github.com:tharris/wormbase-app.git
 git push origin master
     

Importing a SVN Repo?

 Click here
     

When you're done:

 Continue