7.2. Pydev

GDA and Scisoft use a modified version on PyDev.

This version of Pydev needs to be kept up to date with the main releases of Pydev, and an example of that follows here. This example assumes that you have a Github account, as well as push access to the opengda repository.

7.2.1. Update Process

Load up git

module load git

Generate a ssh key for Github

ssh-keygen -t rsa -C "mark.basham@diamond.ac.uk"

Look at the public key and add it to Github

gedit id_rsa.pub

Ssh to Github to check that this is working

ssh git@github.com

Configure git to work with Github, the token is obtained from the Github web-site for your login

git config --global user.name "Mark Basham"
git config --global user.email "mark.basham@diamond.ac.uk"
git config --global github.user markbasham
git config --global github.token 4906####################d87e

Go to where you want the git clone

cd ~/pydev/

Then clone it in to the directory using the URL from the Github web-site

git clone git://github.com/openGDA/Pydev.git

Go into that directory

cd Pydev/

You can use the gitk GUI to look at the current state

gitk &

Now we have the diamond Pydev checked out we want to add the Aptana one as a remote, so we can get the changes

git remote add pydev git://github.com/aptana/Pydev.git

Then fetch all the changes to our repository so we can make the merge

git fetch pydev -t

Now this is done go the the opengdatrunk, and then make a branch of this into which we shall make the merge

git checkout opengdatrunk
git checkout -b upgradeto2_1

Now check which tag we want to look at

git tag

Then choose the tag we want to merge to

git merge pydev_2_1_0

The merge is now complete, check the status to see how things went, or there is a nice GUI for looking at all the merges and conflicts

git status
git gui

However at this point it can often be useful to return to Eclipse to make the merge

Once happy that everything is done, add all the changes and commit to your local branch

git add -A
git status
git commit
git status

You can then check the diff between the new branch and the tag if you wish to check that sensible changes have been made

git diff pydev_2_1_0

Now the merge is complete on the branch, you need to merge back to the trunk and update your changes toGithub.

First set up the remote site for writing, make sure you have write access to the openGDA

git remote set-url origin git@github.com:openGDA/Pydev.git

Go back to the trunk

git checkouk opengdatrunk

Then merege back in the branch we just made, this should take no time, as it should just be a ‘fast forward’ and so no work to do

git merge upgradeto2_1

Have a quick look to make sure things are all as they should be

git status
gitk

Then push the changes back into the man repository on Github

git push origin opengdatrunk

Finally there is a master branch, which should b e brought up to date

git checkout -b bringmasterup2date origin/master
git merge opengdatrunk
git push origin bringmasterup2date:master

And thats it, all done.