1 / 56

Source revision control system

Source revision control system. Contents. 1. SVN (subversion). 1.1. Download and install. 1.2. Setup. 1.3. Test from terminal. 1.4. Test from eclipse. 1.5. Test from xcode. 2. git. 3. Mercurial. 4. Additional materials. 1.1. SVN (subversion) – Download and install. 参考資料

avital
Download Presentation

Source revision control system

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Source revisioncontrol system

  2. Contents 1. SVN (subversion) 1.1. Download and install 1.2. Setup 1.3. Test from terminal 1.4. Test from eclipse 1.5. Test from xcode 2. git 3. Mercurial 4. Additional materials

  3. 1.1. SVN (subversion) – Download and install • 参考資料 • Subversion homepage: http://subversion.apache.org/ • Subversionの基礎練習:http://www.hyuki.com/techinfo/svninit.html • Official manual: http://subversion.apache.org/docs/ • Subversion plug-in for eclipse: http://subclipse.tigris.org/ • Subversion for Xcode4 • Xcode 4 User Guide: Managing Versions of Your Project

  4. 1.1. SVN (subversion) – Download and install • Test installation (for Mac OS 10.6 or later, use the built-in version) • $ svn • Type 'svn help' for usage. • If SVN is not installed, download and install it. • http://subversion.apache.org/ • or install from easypackage or macport

  5. 1.2. SVN (subversion) – setup • Make a repository • $ cd ~/Documents • $ svnadmin create svnRep • --> a directory "/Users/guan/Documents/svnRep" is created. • Start SVN as daemon • Method 1: start daemon once • $ svnserve-d -r /Users/guan/Documents/svnRep • $ svncheckout svn://localhost/ test • Checked out revision 0. • Method 2: start daemon by using launchd • $ sudolaunchctl load /Library/LaunchDaemons/org.tigris.subversion.svnserve.plist • $ sudolaunchctl start org.tigris.subversion.svnserve • succeed if no error messages. • $svn checkout svn://localhost/ test • Checked out revision 0.

  6. 1.2. SVN (subversion) – setup /Library/LaunchDaemons/org.tigris.subversion.svnserve.plist http://edesign.pc.ie.u-ryukyu.ac.jp/internal/lectures/org.tigris.subversion.svnserve.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">    <dict>        <key>Disabled</key>        <false/>        <key>Label</key>        <string>org.tigris.subversion.svnserve</string>        <key>UserName</key>        <string>guan</string>        <key>Umask</key>        <integer>2</integer>        <key>ProgramArguments</key>        <array>            <string>/usr/bin/svnserve</string>            <string>--inetd</string>            <string>--root=/Users/guan/Documents/svnRep</string>        </array> ... Change the blue text to your own userid

  7. 1.2. SVN (subversion) – setup $ cd /Users/guan/Documents/svnRep/conf change the lines in svnserve.confas follows: [general] anon-access = read auth-access = write password-db = passwd change the lines in passwdas follows: [users] guan = pass1 user2 = pass2 Subversion server is ready. Now you can import and submit the project files from terminal, eclipse or xcode.

  8. 1.3. SVN (subversion) – test from terminal $mkdirtmp $cd tmp $mkdiridyl-proj $mkdiridyl-proj/trunk $mkdiridyl-proj/branches $mkdiridyl-proj/tags $ cp -R ~/idyl/* idyl-proj/trunk ----> copy the files in idyl to idyl-proj/trunk $ svn import . svn://localhost --message 'Initial idyl-proj import' --username guan Authentication realm: <svn://localhost:3690> 36fb4379-dd86-41fc-8490-9b021973f598 Password for 'guan': Adding idyl-proj Adding idyl-proj/trunk Adding idyl-proj/trunk/app.yaml Adding idyl-proj/trunk/index.yaml Adding idyl-proj/trunk/main.py Adding idyl-proj/branches Adding idyl-proj/tags

  9. 1.3. SVN (subversion) – test from terminal $cd .. $rm -fRtmp/ $svn checkout --username guan svn://localhost/idyl-proj/ idyl-proj-new $ls -al drwxr-xr-x 6 guan staff 204 Jun 25 17:16 idyl-proj-new $cd idyl-proj-new $ls -al drwxr-xr-x 7 guan staff 238 Jun 25 17:16 .svn drwxr-xr-x 3 guan staff 102 Jun 25 17:16 branches drwxr-xr-x 3 guan staff 102 Jun 25 17:16 tags drwxr-xr-x 6 guan staff 204 Jun 25 17:16 trunk $cd trunk $ls -al drwxr-xr-x 7 guan staff 238 Jun 25 17:16 .svn -rw-r--r-- 1 guan staff 99 Jun 25 17:16 app.yaml -rw-r--r-- 1 guan staff 471 Jun 25 17:16 index.yaml -rwxr-xr-x 1 guan staff 1002 Jun 25 17:16 main.py

  10. 1.4. SVN (subversion) – test from eclipse install subclipse http://subclipse.tigris.org/update_1.6.x After installation, please refer to lecture-usage-of-eclipse for detailed usage.

  11. 1.4. SVN (subversion) – test from xcode

  12. 1.5. SVN (subversion) – test from xcode 3) input the information for the subversion server

  13. 1.5. SVN (subversion) – test from xcode 4) View the repositories from menu SVM >> Repositories 5) Checkout the project and open it (note: confirm the selected path)

  14. Contents 1. SVN (subversion) 2. git 2.1. Download and install 2.2. Test from eclipse 2.3. Test from xcode 3. Mercurial 4. Additional materials

  15. 2.1. git – Download and install • 参考資料 • Git homepage: http://git-scm.com/ • Git 入門: http://www8.atwiki.jp/git_jp/ • Official manual: http://schacon.github.com/git/gittutorial.html • Git plug-in for eclipse: http://eclipse.org/egit/ • Git for Xcode4 • Xcode 4 User Guide: Managing Versions of Your Project

  16. 2.1. git – Download and install • Test installation (for Mac OS 10.6 or later, use the built-in version) • $ git • usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] • … • If git is not installed, download and install it. • http://git-scm.com/download • or install from easypackage or macport

  17. 2.2. git – test from eclipse - install install git http://download.eclipse.org/egit/updates

  18. 2.2. git – test from eclipse – share project • Right click on the project name -- Team >>> Share Project…

  19. 2.2. git – test from eclipse • Configure gitrepository

  20. 2.2. git – test from eclipse – add to repository • Add to source control

  21. 2.2. git – test from eclipse - commit • Commit to repository

  22. 2.2. git – test from eclipse - commit

  23. 2.2. git – test from eclipse – check repository tree • Repository tree

  24. 2.3. git – test from xcode4 – create a new project • Create a new project

  25. 2.3. git – test from xcode4 – create local git repository • Also create local git repository

  26. 2.3. git – test from xcode4 – initial commit • Open source control • Confirm the repository and the initial commit.

  27. 2.3. git – test from xcode4 • Revise the source (insert a new comment line)

  28. 2.3. git – test from xcode4 - commit • Commit the changes

  29. 2.3. git – test from xcode4 - compare with other revision

  30. git – test from xcode4 • Compare local revision with the others

  31. git – test from xcode4 • Confirm in the repository • Checkout (clone) repository

  32. 2.3. git – test from xcode4 – checkout • Checkout (clone) repository

  33. 2.3. git – test from xcode4 - checkout • Checkout (clone) repository

  34. Contents 1. SVN (subversion) 2. git 3. Mercurial 3.1. Download and install 3.2. Setup 3.3. Test from eclipse 4. Additional materials

  35. 3.1. Download and install • 参考資料 • 学科資料Mercurial: http://bit.ly/odxH3G • 学科Mercurial閲覧 http://www.ie.u-ryukyu.ac.jp/viewhg.php • Mercurial homepage: http://mercurial.selenic.com/ • MercurialEclipse: http://www.javaforge.com/project/HGE • Tutorial Video: 4 Priceless Tips in 4 Minutes for Google Code, Mercurial and Eclipse

  36. 3.1. Download and install Install MercurialEclipse (menu Help >> Install new software…) Work with: Mercurial - http://cbes.javaforge.com/update

  37. 3.2. Setup - confirm installation Click menu: Eclipse >> Preferences…

  38. 3.3. Test from eclipse – Share project • Step 01: Select Team >> Share Project… • Step 02: Choose Mercurial and click Next

  39. 3.3. Test from eclipse – Share project • Step 01: Select Team >> Share Project… • Step 02: Choose Mercurial

  40. 3.3. Test from eclipse – Add to repository • Step 03: Select Team >> Add… 操作後

  41. 3.3. Test from eclipse – Commit • Step 04: Select Team >> Commit… 操作後

  42. 3.3. Test from eclipse – Setup for remote repository • Step 05: Right click on the project name, select Properties

  43. 3.3. Test from eclipse – Setup for remote repository • Step 05: Right click on the project name, select Properties • On server side: • If no repository exists, please initialize by: hg init, or check “Init Mercurial repository”. • Change ssh configurations to enable auto login. (don’t input password here)

  44. 3.3. Test from eclipse – push • Step 06: Right click on the project name, select Team >> Push…

  45. 3.3. Test from eclipse – push • Step 06: After push operation

  46. 3.3. Test from eclipse – Commit revisions • Step 07: Revise the source code and commit with some comments

  47. 3.3. Test from eclipse – synchronizing • Step 08: Synchronizing 操作後

  48. 3.3. Test from eclipse – Team synchronizing perspective • Step 07: Revise the source code and commit with some comments

  49. Contents 1. SVN (subversion) 2. git 3. Mercurial 4. Additional materials 4.1. Version control server 4.2. Compare & merge file

  50. 4.1. Version control server - subversion • Mac OS X: Please refer to 1.2 SVN (subversion) – Setup • Linux: • Access from client: svn://server_name/ or https://server_name 1. Create a Repository svnadmincreate /svnrepos 2. Create SVN Users vi /svnrepos/conf/svnserve.conf In that file add these three lines: anon-access = none auth-access = write password-db = passwd Create a password file: vi /svnrepos/conf/passwd In that file add a line for your user: # add users in the format : user = password user1 = password1 user2 = password 2 3. Import Your Project (assuming your project files is in /projects/exProject) svnimport /projects/exProjectfile:///svnrepos/exProject 4. Start the SVN Server as Daemon svnserve –d Done! Try checking it out of the repository: svnco svn://server_hostname/exProject You should be prompted for username and password which you created in file passwd.

More Related