Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.
-
Upload
adam-fields -
Category
Documents
-
view
217 -
download
0
Transcript of Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.
![Page 1: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/1.jpg)
Subversion (SVN) TutorialSource: http://www.cs.ubc.ca/~vailen/svn_howto.htm
![Page 2: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/2.jpg)
SVN
2November 22, 2007
• Subversion (SVN) is a version control system • It allows users to keep track of changes made to any
type of electronic data, typically source code, web pages or design documents.
• Read SVN wiki to know more about SVN
![Page 3: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/3.jpg)
SVN for CPD
• Server : svn.cs.mcgill.ca• Path: /xtra/cpd• Repository: /xtra/cpd/svn• Authorized user:
November 22, 2007 3
![Page 4: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/4.jpg)
What will be covered today
November 22, 2007 4
• Import project/files to SVN
• Checkout project/files from SVN
• Commit changed files to SVN
![Page 5: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/5.jpg)
For Windows
• Install TortoiseSVN (http://tortoisesvn.tigris.org/)
• Setup SSH client – From the pop-up menu of the File Manager, select
TortoiseSVN Setting -> Networks -> SSH and set ssh client to TortoisePlink.exe, which comes together with TortoiseSVN (It is usually in C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe).
– You can add two additional arguments after TortoisePlink.exe to avoid entering your username and password everytime:
C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -l username -pw password
November 22, 2007 5
![Page 6: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/6.jpg)
For Windows
• Import a new module Select a folder that you want to import, e.g. C:\toolbox. From the pop-up menu, select TortoiseSVN -> Import, and set URL or Repository:
svn+ssh://svn.cs.mcgill.ca/xtra/cpd/svn/toolbox/trunk
• Checkout a moduleFrom the pop-up menu of the File Manager, select TortoiseSVN -> Checkout. URL or Repository: svn+ssh://svn.cs.mcgill.ca/xtra/cpd/svn/toolbox/trunkDirectory: C:\toolbox
November 22, 2007 6
![Page 7: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/7.jpg)
For Windows
• Commit changes to the repository From the pop-up menu of the File Manager, select TortoiseSVN -> Commit.
November 22, 2007 7
![Page 8: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/8.jpg)
Directory Layout
• The minimal layout recommended for a project repository:
project/:trunk/ up-to-date codetags/ for releasesbranches/ branching / evolution of
release
• See SVN wiki and reference tutorials for more details
November 22, 2007 8
![Page 9: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/9.jpg)
For LINUX
• SSH to: svn.cs.mcgill.ca• Import a new module
Suppose you want to import a new module test and the files are hosted in ./test, use the command
svn import test file:///xtra/cpd/svn/test/trunk -m “any message”
November 22, 2007 9
![Page 10: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/10.jpg)
For LINUX
• Checkout a module Suppose you want to checkout module toolbox and your work directory is ./toolbox, use the command
svn checkout file:///xtra/cpd/svn/toolbox toolbox
• Check the status of files in the working directoryYou can use the following command to check the status of files in the working directory:
svn status [--verbose]
November 22, 2007 10
![Page 11: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/11.jpg)
For LINUX
• Commit changes to the repository To commit changes to the repository, just enter your working directory and type:
svn commit
• Get help?svn helpsvn help [command]
November 22, 2007 11
![Page 12: Subversion (SVN) Tutorial Source: vailen/svn_howto.htm.](https://reader034.fdocuments.us/reader034/viewer/2022051517/56649eb45503460f94bbcc5d/html5/thumbnails/12.jpg)
Useful Links
• SVN Wiki http://en.wikipedia.org/wiki/Subversion_(software)
• Linux tutorial:http://artis.imag.fr/~Xavier.Decoret/resources/svn/index.html
• Free online book:http://svnbook.red-bean.com/
• SVN FAQ:http://subversion.tigris.org/faq.html#why
November 22, 2007 12