Subversionn Introduction at SuperMondays 2009-09-01

Embed Size (px)

DESCRIPTION

A quick and dirty introduction to subversion that I gave at the SuperMondays event in Newcastle upon Tyne (UK) on Tuesday (!) 1st September 2009.

Citation preview

  • 1. Subversion Not that cool Alex Kavanagh [email_address] @ajkavanagh

2. but very good 3. In the beginning there was RCS 4. and RCS begat CVS 5. and CVS begat SVN (sort of ) 6. The 80% VCS 7. http:// subversion .tigris.org/ 8. or via yum, 9. or aptitude 10. or some other way (see the website!) 11. To learn it 12. get this book 13. 14. Why use a Version Control System? 15. if you 16. program 17. design web sites 18. write, or edit, text 19. then you are always 20. making changes! 21. if you're not using a VCS 22. then HOW are you tracking those changes? 23. That's what subversion 24. Git, Hg, Darcs, Bzr (and others) 25. do 26. 27. Why useSubversion ? 28. DVCS are definitely cooler 29. Bzr 30. Lots of projects use svn 31. Most people don't 'get' DVCS 32. Branching and Tagging 'lose' most people 33. Corporates types like centralised repositories 34. = Subversion used everywhere (~30% of Open Source projects) 35. Subversion bits 36. Cross Platform 37. Centralised Repository (Networkednotdecentralised) 38. Copies are cheap 39. Subversion tracks filesanddirectories (even empty ones) 40. Revision Numbers are per repository 41. Files and Directories can have properties/meta-data 42. Important: Every commit goes to central repository 43. GUI Tools: Windows: TortoiseSVN Cross Platform: RapidSVN 44. Command Line: $ svn args 45. Repository Schemes 46. $ svn cofile ://home/alex/svnroot/repos/... 47. $ svn cosvn ://server/repos/... 48. $ svn cosvn+ssh ://server/repos/... 49. $ svn cohttp ://server/repos/... 50. Trunk, Branches and Tags 51. Subversion Convention: - trunk |- branches V1 |- tags- REL-1.0 52. Trunk: Normal Development 53. Branches: Bugs, Releases, Experiments 54. Tags: Release points (REL-1.0) Reference points (PRE-BUG-123) 55. Subversion uses '.svn/' directories (and litters them in each sub-directory) 56. A flavour of subversion (Command Line!) 57. $svn ls svn://devcentre/nxec/client error-page-plugin/ start-page/ test-usb/ 58. $ mkdir test-usb $ cd test-usb/ $svn co svn://devcentre/nxec/client/test-usb/trunk. Ainstall.sh Atest-usb.sh Areport-usb.sh Checked out revision 304. 59. $svn info Path: . URL: svn://devcentre/nxec/client/test-usb/trunk Repository Root: svn://devcentre Repository UUID: 91107793-f093-49fa-88a1-086c1fccaf20 Revision: 304 Node Kind: directory Schedule: normal Last Changed Author: dev Last Changed Rev: 210 Last Changed Date: 2009-08-10 11:15:24 +0100 (Mon, 10 Aug 2009) 60. $ touch README $svn st ?README 61. $svn add README AREADME 62. $svn ci -m "Added README file" AddingREADME Transmitting file data . Committed revision 305. $svn up At revision 305. 63. $svn log ------------------------------------------------------------------------ r305 | dev | 2009-09-01 14:12:58 +0100 (Tue, 01 Sep 2009) | 1 line Added README file ------------------------------------------------------------------------ r297 | dev | 2009-08-28 10:07:55 +0100 (Fri, 28 Aug 2009) | 1 line renaming client-utils to client ------------------------------------------------------------------------ r210 | dev | 2009-08-10 11:15:24 +0100 (Mon, 10 Aug 2009) | 1 line Importing test-usb utils ------------------------------------------------------------------------ 64. Importing a Project: $cd $ svn import -m project name.svn://server/project/trunk $ mkdir $ svn co svn://server/project/trunk 65. Importing a Project: $cd $svn import -m project name.svn://server/project/trunk $ mkdir $ svn co svn://server/project/trunk 66. Importing a Project: $cd $svn import -m project name.svn://server/project/trunk $mkdir $ svn co svn://server/project/trunk 67. Importing a Project: $cd $svn import -m project name.svn://server/project/trunk $mkdir $svn co svn://server/project/trunk 68. Creating a Branch: $ svn mkdir -m Making branches svn://server/project/branches $cd copy -m Making Release Branchsvn://server/project/trunksvn://server/project/branches/REL-1.0 69. Some Subversion features 70. Commits are true atomic operations 71. Renamed/copied/moved/removed files retain full revision history. 72. Versioning of symbolic links. 73. Native support for binary files, with space-efficient binary-diff storage 74. Branching and tagging are cheap operations, independent of file size Subversion itself does not distinguish between a tag, a branch, and a directory 75. File locking for unmergeable files ("reserved checkouts") 76. & 77. if (like me) you like a DVCS like Git 78. you can use Git with Subversion! git-svn (for when you have to use subversion) 79. Questions?