Presentation is loading. Please wait.

Presentation is loading. Please wait.

CVS repositories, and how to set them up for using CCPN.

Similar presentations


Presentation on theme: "CVS repositories, and how to set them up for using CCPN."— Presentation transcript:

1 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ CVS repositories, and how to set them up for using CCPN.

2 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Introduction  Problem of people in different locations working on same code Solutions in ‘version management’ code like CVS, SVN The code is stored in one central place  CCPN works with several of these ‘repositories’ How can you use and best combine them?  See also link at bottom of slides for more details

3 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Directory structure repository_name/ c/c/ data/java/python/ ccpnmr/ ccp/ ccpnmr/ccp/memops/ ccpnmr/ccp/memops/ analysis/ chemElement/chemComp/ clouds/analysis/format/

4 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ New code slots in…  Even if in different location, retaining the same directory structure makes integration much easier later on  Only have to make sure that everyone agrees on organisation and that directory name combinations are unique

5 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Repositories  Central CVS repositories Code is developed locally Users ‘commit’ changes to their code when required Central repository stores efforts from all partners Partners ‘check out’ changes made by other partners from central repository to their local directory Allows sharing of all code with minimal effort

6 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Repositories  CCPN currently uses two repositories: ccpn/  ‘Lives’ at SourceForge - all LGPL open source code. ccpn_int/  ‘Lives’ at computer in Laue lab, stores code that is not LGPL (e.g. ccpNmr Analysis) Project specific: recoord/, extendNmr/. All have exactly the same directory structure and can be merged easily

7 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging ccpn/ python/ ccpnmr/ccp/memops/ format/ ccpn_int/ c/c/ python/ ccpnmr/ analysis/clouds/analysis/

8 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging work/ c/c/python/ ccpnmr/ ccp/memops/ analysis/clouds/analysis/format/

9 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  Making our own local repository: mkdir testCvs cd testCvs mkdir -p dummy/python mkdir dummy/java mkdir dummy/data cvs -d /testCvs/repository/ init cd dummy cvs -d /testCvs/repository import -m “My repository” myProject vendor tag

10 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  Checking out the local repository: cd.. ls repository cvs -d /testCvs/repository checkout myProject ls myProject

11 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  At this stage: dummy/ is redundant repository/ contains the central repository files myProject/ contains the local copy of the repository

12 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  Adding files to the local copy of the repository: cd myProject/python mkdir myProgram cvs -d /testCvs/repository add myProgram cd myProgram myFile.py cvs -d /testCvs/repository add myFile.py cvs -d /testCvs/repository commit -m “my comments here” myFile.py

13 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  Can now check what has changed in repository/  Other developers (with access) can make changes to repository/ as well  Need to ‘update’ your local copy so you can ‘get’ the changes made by other developers

14 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Simple CVS  Updating your local copy of the repository: cd /myProject cvs update -dP cvs update -dP python/ cvs update -dP python/myProgram/myFile.py

15 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging repositories  Often have: Local files  E.g. some test scripts that are only relevant for you, Python.pyc files, C.o files, … Actual repository files  Good practice to keep these separate Avoids accidentally checking in ‘local’ files Clear separation between what is ‘public’ and what is not.

16 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging repositories  Create a workspace: mkdir workspace cd workspace cvs -d :pserver:ccpn.cvs.sourceforge.net/cvsroot/ccpn checkout -r branch4 ccpn cvs -d /testCvs/repository checkout myProject mkdir all

17 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging repositories  Download the ‘copyFromRep.py’ script http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs- repositories/copyfromrep.py  Sets up and maintains your working directory: Will recreate the directory structure found in the repositories Makes symbolic links to the repository files

18 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging repositories  Have to change the directory names at the top! ccpnRepDirs = (’ /workspace/ccpn', ’ /workspace/myProject') destDir = ’ /workspace/all’

19 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Merging repositories  Merge the directories: To see what’s going to happen: python copyFromRep.py test To make the changes: python copyFromRep.py copy

20 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Setting up CCPN  To start using the code: setenv CCPNMR_TOP_DIR /workspace/all setenv PYTHONPATH $CCPNMR_TOP_DIR/python:$PYTHONPATH cd /workspace/all/python/memops/scripts_v2/ python makePython.py

21 http://www.ccpn.ac.uk:9080/ccpn/projects/extendnmr/working-with-cvs-repositories/ Examples and documentation  Examples (Python)  Documentation $CCPNMR_TOP_DIR/python/doc/api.html $CCPNMR_TOP_DIR/python/ccp/examples $CCPNMR_TOP_DIR/python/ccpnmr/format/examples


Download ppt "CVS repositories, and how to set them up for using CCPN."

Similar presentations


Ads by Google