Changes between Initial Version and Version 1 of AddNewModule


Ignore:
Timestamp:
Apr 26, 2007 12:23:10 PM (17 years ago)
Author:
Andy Vick
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AddNewModule

    v1 v1  
     1= Adding a new module =
     2'''AKA import, add, commit cycle'''
     3
     4== Assumptions ==
     5For the purpose of this note I assume that;
     6 * The SVN server is being accessed via '''https:'''
     7 * The SVN repository is '''Ultracam'''
     8 * You're using the '''module/trunk''', '''module/tags''' and '''module/branches''' layout
     9 * Your module is called MyServer
     10 * You've got some sourcode, in '''~/mysrc''' that you want to check in
     11
     12== 1) Create the directory structure ==
     13You need to '''import''' an initial directory structure. You can do this in a temporary location thus;
     14
     15{{{
     16> cd /tmp
     17> mkdir ttt
     18> cd ttt
     19> mkdir MyServer
     20> mkdir MyServer/trunk
     21> mkdir MyServer/tags
     22> mkdir MyServer/branches
     23> svn import . https://forge.roe.ac.uk/svn/Ultracam --message 'Initial repository layout'
     24}}}
     25
     26This will create the directories MyServer/trunk, MyServer/tags and MyServer/branches in the Ultracam repository on the SVN server. After that you should get rid of the temporary directories;
     27{{{
     28> cd /tmp
     29> rm -rf ttt
     30}}}
     31
     32== 2) Check out a working copy ==
     33You need to check out a working copy so you can add sourcecode (etc) to it;
     34{{{
     35> cd /tmp
     36> svn checkout https://forge.roe.ac.uk/svn/Ultracam/MyServer/trunk MyServer
     37}}}
     38
     39This will create a directory MyServer (in /tmp) that contains only a .svn directory
     40
     41
     42== 3) Add files ==
     43Populate the project by copying files (and/or directories) to the working copy
     44{{{
     45> cd MyServer
     46> cp ~/mysrc/*.cpp ~/mysrc/*.h ~/mysrc/Makefile  .
     47}}}
     48Make sure the working copy is '''clean''', i.e. there aren't any object files or executables. You only want to check in source code.
     49
     50== 4) Update the repository ==
     51One way is to add the new files, then commit them;
     52{{{
     53> svn add *
     54> svn commit -m "Initial source code check-in"
     55}}}
     56
     57== 5) Cleanup ==
     58{{{
     59> cd /tmp
     60> rm -rf MyServer
     61}}}
     62
     63== Now you can use it ==
     64You can now run '''svn checkout https://forge.roe.ac.uk/svn/Ultracam/MyServer/trunk MyServer''' anywhere and it should check you out the current working copy of the MyServer module.
     65 
     66
     67