Svn Subversion

2,362 views

Published on

A Version Control tool.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,362
On SlideShare
0
From Embeds
0
Number of Embeds
179
Actions
Shares
0
Downloads
55
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Svn Subversion

  1. 1. SVN - Subversion Ranjan Kumar C-DAC Mumbai
  2. 2. Agenda <ul><li>Introduction </li></ul><ul><li>Quick Start </li></ul><ul><li>Checkout and Recovery </li></ul><ul><li>Eclipse as a client </li></ul><ul><li>References </li></ul>
  3. 3. Introduction <ul><li>How to check whether SVN is already there in your linux system or not? </li></ul><ul><ul><li>svn </li></ul></ul><ul><ul><li>svnadmin </li></ul></ul><ul><ul><li>svndumpfilter </li></ul></ul><ul><ul><li>svnlook </li></ul></ul><ul><ul><li>svnserve </li></ul></ul><ul><ul><li>svnsync </li></ul></ul><ul><ul><li>svnversion </li></ul></ul>
  4. 4. Quick Start <ul><li>Subversion stores all data in a central repository. So first of all create a new repository. </li></ul><ul><li>$svnadmin create /var/svn/repos </li></ul><ul><li>Following files and directories are created in the directory /var/svn/repos </li></ul><ul><li>conf, </li></ul><ul><li>dav, </li></ul><ul><li>db </li></ul><ul><li>format </li></ul><ul><li>hooks </li></ul><ul><li>locks </li></ul><ul><li>README.txt </li></ul>
  5. 5. <ul><li>2. Creating repository for your project say ‘myproject’. </li></ul><ul><li>/var/svn/repos/ </li></ul><ul><li>| </li></ul><ul><li>|--- conf </li></ul><ul><li>| |--- svnserve.conf </li></ul><ul><li>|--- dav/ </li></ul><ul><li>|--- db/ </li></ul><ul><li>|--- format </li></ul><ul><li>|--- hooks/ </li></ul><ul><li>|--- locks/ </li></ul><ul><li>|--- README.txt </li></ul><ul><li>|--- myproject/ </li></ul><ul><li>| |--- branches / </li></ul><ul><li>| |--- tags / </li></ul><ul><li>| |--- trunk / </li></ul>
  6. 6. <ul><li>3. Create group of users. </li></ul><ul><li>$ groupadd myproject_developers </li></ul><ul><li>4. Add users to the group. </li></ul><ul><li>How to add a new user(not already existing) ? </li></ul><ul><li>$ useradd -g myproject_developers sony </li></ul><ul><li>$ id sony </li></ul><ul><li>How to add existing user? </li></ul><ul><li>$ usermod -a -G myproject_developers mony </li></ul><ul><li>$ id mony </li></ul>
  7. 7. <ul><li>5. Defining owner and groupowner of the directories db and myproject . </li></ul><ul><li>$ chown -Rvf root myproject </li></ul><ul><li>$ chgrp -Rvf myproject_developers myproject </li></ul><ul><li>$ chown -Rvf root /var/svn/repos/db </li></ul><ul><li>$ chgrp -Rvf myproject_developers /var/svn/repos/db </li></ul>
  8. 8. <ul><li>6. Change the permissions of directories db and myproject . </li></ul><ul><li>$ chmod -Rvf u=+rwx myproject </li></ul><ul><li>$ chmod -Rvf g=+rwx myproject </li></ul><ul><li>$ chmod -Rvf u=+rwx /var/svn/repos </li></ul><ul><li>$ chmod -Rvf g=+rwx /var/svn/repos </li></ul>
  9. 9. <ul><li>7. Import existing projects to the repository. </li></ul><ul><li>$ svn import myproject file:///var/svn/repos/myproject/trunk -m &quot;initial import&quot; </li></ul><ul><li>8. Starting the svn server if it is not already running. </li></ul><ul><li>$ svnserve -d </li></ul><ul><li>$ svnserve -d -r /var/svn </li></ul>
  10. 10. <ul><li>Now its all done. </li></ul>
  11. 11. Checkout and Recovery <ul><li>How to checkout the working copy of the specific project repository? </li></ul><ul><li>$ svn checkout svn+ssh://mony@201.13.146.23/var/svn/repos/myproject/trunk workspace </li></ul><ul><li>How to recover the SVN repository? </li></ul><ul><li>$ svnadmin recover /var/svn/repos </li></ul><ul><li>$ chmod -Rvf u=+rwx /var/svn/repos </li></ul><ul><li>$ chmod -Rvf g=+rwx /var/svn/repos </li></ul>
  12. 12. Eclipse as a client <ul><li>http:// subclipse.tigris.org/install.html </li></ul>
  13. 13. References <ul><li>Subversion book is available at: http://svnbook.red-bean.com / For more information about the Subversion project, visit: http:// subversion.tigris.org . For eclipse plugin for subversion: http:// subclipse.tigris.org / . </li></ul><ul><li>More Details </li></ul><ul><li>http://ranjankumar.com/2008/09/26/svn-subversion / </li></ul>

×