0
SUBVERSION FOR SMARTIES <ul><li>Cameron Childress </li></ul><ul><li>[email_address] </li></ul>
Intro <ul><li>ColdFusion, since 1996 </li></ul><ul><li>ACFUG since, 1998 </li></ul><ul><li>Foosball, since 2001 </li></ul>...
Session Description <ul><li>So you know how to Branch and Tag, but you have a sneaky suspicion there is more you could be ...
Preview <ul><li>Review of SVN basics </li></ul><ul><li>A few non-SVN things </li></ul><ul><li>Interesting bits built into ...
Review: Key Advantages vs. VSS or CVS <ul><li>SVN Server runs on many platforms </li></ul><ul><li>Many clients available f...
<ul><li>Subversion vs. Git – Basics </li></ul><ul><li>Created by Linus Torvalds </li></ul><ul><li>Replaced BitKeeper  </li...
Subversion vs. Git – Git Wins <ul><li>SVN is Centralized, Git is distributed </li></ul><ul><li>Local operations are faster...
Subversion vs Git – SVN Wins <ul><li>Better IDE support </li></ul><ul><li>SVN has a de-facto single Repository </li></ul><...
Review: Subversion Basics <ul><li>Conventional Project Structure </li></ul><ul><ul><li>Branches </li></ul></ul><ul><ul><li...
Review: Key Subversion Features <ul><li>Revision numbers apply to entire tree </li></ul><ul><li>Directories are versioned ...
Something New in SVN: Changelists <ul><li>Introduced in SVN 1.5 (currently at 1.6) </li></ul><ul><li>Also a feature in Per...
Changelists – You Should Know <ul><li>Part of working copy, not repository </li></ul><ul><li>Only works with files, not di...
Changelist: How To – Command Line <ul><li>Syntax:  svn changelist [listname] [filelist] </li></ul><ul><li>Listname can be ...
Changelist: How To – Tortoise <ul><li>Example… </li></ul>
By the way: Perforce Also Has… <ul><li>Labels </li></ul><ul><ul><li>Similar to Tags, but not simply convention </li></ul><...
SVN Properties <ul><li>Think “metadata” for each file </li></ul><ul><li>Stored in .svn/props </li></ul><ul><li>Checked int...
Special SVN Property: svn:keywords <ul><li>Used for keyword substitution </li></ul><ul><li>Must be explicitly turned on </...
Automate Keyword Substitution <ul><li>Config file “miscellany” section </li></ul><ul><li>Applies to working copy, not repo...
Hooks <ul><li>Run a program at certain points in commit process </li></ul><ul><li>Implemented as bat file in Windows </li>...
Hook Types <ul><li>start-commit </li></ul><ul><li>pre-commit / post-commit </li></ul><ul><li>pre-revprop-change  / post-re...
Hooks: Tips <ul><li>Hook programs execute with an empty environment </li></ul><ul><li>Do  not  modify a commit transaction...
Hooks: Ideas <ul><li>Push code to staging server </li></ul><ul><li>Send notification emails to dev team </li></ul><ul><li>...
Resources for Hooks <ul><li>Brad Wood’s Blog http://www.codersrevolution.com/index.cfm/2008/9/15/Creating-a-postcommit-hoo...
Visual SVN Server <ul><li>Windows installer (visualsvn.com) </li></ul><ul><li>Installs Apache based Service </li></ul><ul>...
SVN Abstration Layer <ul><li>Provides abstraction for RIA Forge By: Rob Gonda </li></ul><ul><li>Configure via XML </li></u...
SVN Abstraction Layer <ul><li>Repositories </li></ul><ul><ul><li>Create, delete, list </li></ul></ul><ul><li>Users </li></...
SVN Abstraction Layer: Example Code <ul><li>svnService = createObject('component', 'models.svnService').init('config/confi...
SVN Sync <ul><li>SVNSync – Repo Browser By: Tom de Manincor </li></ul><ul><li>Configure via XML (X2) </li></ul><ul><ul><li...
SVN Sync <ul><li>Let’s check it out… </li></ul>
Roundup: RIA Forge Projects <ul><li>Deployment builder - ANT/SVN By: Matt Riley http://deploymentbuilder.riaforge.org/ </l...
Roundup: RIA Forge Projects <ul><li>SVNAuthz.cfc – Manipulate authz files By: Terrance Ryan http://svnauthz.riaforge.org/ ...
Resources <ul><li>Book - Version Control with Subversion http://svnbook.red-bean.com </li></ul><ul><li>Windows Installer /...
Questions? <ul><li>Contact: </li></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li>cameroncf (YIM / AIM) </li></...
Upcoming SlideShare
Loading in...5
×

Download It

800

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
800
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • - From wikipedia “Several high-profile software projects now use Git for revision control, [2] most notably the Linux kernel , Perl , [3] GNOME , [4] Samba , X.org Server , Qt , One Laptop per Child (OLPC) core development, [5] VLC , Wine , Ruby on Rails [6] , Gentoo based Funtoo , and the Android mobile platform.”
  • Git repo is created locally on your machine, not a central hub and spoke model like SVN Since the repository is local, it’s faster than network based operations Easier to work offline History and revert is faster and can be done offline Each working copy is a branch Merges are tracked more closely, happens more frequently
  • Git is primarily command line, not many visual tools exist (yet) for Git SVN’s single repository makes it easier to know you have everything SVN having one central repo makes it easier to backup The distributed nature of Git makes it more difficult to enforce security on a codebase. This may not be a problem for many open source projects, but may be a problem for some commercial software companies. Git uses a SHA1 40 char hex string to identify revisions, it’s also possible to give a revision a shorter name (tag) if needed
  • Config file
  • - Deployment builder has a lot of prerequisites, plan to spend a little time getting it running - Skweegee is built by Russ Johnson, who’s also doing the Git BoF. CF port of Trac + project management
  • Transcript of "Download It"

    1. 1. SUBVERSION FOR SMARTIES <ul><li>Cameron Childress </li></ul><ul><li>[email_address] </li></ul>
    2. 2. Intro <ul><li>ColdFusion, since 1996 </li></ul><ul><li>ACFUG since, 1998 </li></ul><ul><li>Foosball, since 2001 </li></ul><ul><li>Sumo Consulting, since 2002 </li></ul>
    3. 3. Session Description <ul><li>So you know how to Branch and Tag, but you have a sneaky suspicion there is more you could be doing with SVN. Come find out what you've been missing out on and how to make Subversion do more for you! </li></ul>
    4. 4. Preview <ul><li>Review of SVN basics </li></ul><ul><li>A few non-SVN things </li></ul><ul><li>Interesting bits built into SVN </li></ul><ul><li>External tools </li></ul><ul><li>Some examples </li></ul>
    5. 5. Review: Key Advantages vs. VSS or CVS <ul><li>SVN Server runs on many platforms </li></ul><ul><li>Many clients available for SVN </li></ul><ul><li>SVN is free & open source </li></ul><ul><li>Too many more to list… </li></ul>
    6. 6. <ul><li>Subversion vs. Git – Basics </li></ul><ul><li>Created by Linus Torvalds </li></ul><ul><li>Replaced BitKeeper </li></ul><ul><li>Used for Linux Kernel, PERL, RoR, Android OS </li></ul><ul><li>Download at: http://git-scm.com </li></ul>
    7. 7. Subversion vs. Git – Git Wins <ul><li>SVN is Centralized, Git is distributed </li></ul><ul><li>Local operations are faster </li></ul><ul><li>Branching Handling </li></ul><ul><li>Merge Handling </li></ul><ul><li>Smaller HD Footprint (Mozilla 12 GiB in SVN, 420 MiB in Git) </li></ul>
    8. 8. Subversion vs Git – SVN Wins <ul><li>Better IDE support </li></ul><ul><li>SVN has a de-facto single Repository </li></ul><ul><li>Centralized access control </li></ul><ul><li>Version numbers are easier in SVN </li></ul><ul><li>Git / SVN Comparison http://git.or.cz/gitwiki/GitSvnComparsion </li></ul>
    9. 9. Review: Subversion Basics <ul><li>Conventional Project Structure </li></ul><ul><ul><li>Branches </li></ul></ul><ul><ul><li>Tags </li></ul></ul><ul><ul><li>Trunk </li></ul></ul><ul><li>Typical Exposure: </li></ul><ul><ul><li>Comit </li></ul></ul><ul><ul><li>Update </li></ul></ul><ul><ul><li>Resolve Conflicts </li></ul></ul><ul><ul><li>Branch / Merge (maybe) </li></ul></ul>
    10. 10. Review: Key Subversion Features <ul><li>Revision numbers apply to entire tree </li></ul><ul><li>Directories are versioned </li></ul><ul><li>Working Copy vs. Repository </li></ul><ul><li>Caches pristine copy which allows </li></ul><ul><ul><li>Revert </li></ul></ul><ul><ul><li>Diff </li></ul></ul><ul><ul><li>Status </li></ul></ul><ul><li>Branches and tags are normal directories </li></ul><ul><li>Binary files are stored as difference data </li></ul>
    11. 11. Something New in SVN: Changelists <ul><li>Introduced in SVN 1.5 (currently at 1.6) </li></ul><ul><li>Also a feature in Perforce </li></ul><ul><li>Groups files for operations: </li></ul><ul><ul><li>Commit </li></ul></ul><ul><ul><li>Diff </li></ul></ul><ul><li>Great for grouping files for bug resolution </li></ul>
    12. 12. Changelists – You Should Know <ul><li>Part of working copy, not repository </li></ul><ul><li>Only works with files, not directories </li></ul><ul><li>One changelist assignment per file </li></ul><ul><li>Changelists cleared on commit </li></ul><ul><ul><li>Override using flag “--keep-changelists” </li></ul></ul>
    13. 13. Changelist: How To – Command Line <ul><li>Syntax: svn changelist [listname] [filelist] </li></ul><ul><li>Listname can be any string </li></ul><ul><li>Filelist supports wildcards </li></ul><ul><li>More: http://svnbook.red-bean.com/nightly/en/ svn.advanced.changelists.html </li></ul>
    14. 14. Changelist: How To – Tortoise <ul><li>Example… </li></ul>
    15. 15. By the way: Perforce Also Has… <ul><li>Labels </li></ul><ul><ul><li>Similar to Tags, but not simply convention </li></ul></ul><ul><li>ClientSpecs </li></ul><ul><ul><li>Maps repo / directories </li></ul></ul><ul><li>Together… </li></ul><ul><ul><li>Very powerful for deployment </li></ul></ul><ul><ul><li>Great for large teams w/distributed roles </li></ul></ul>
    16. 16. SVN Properties <ul><li>Think “metadata” for each file </li></ul><ul><li>Stored in .svn/props </li></ul><ul><li>Checked into repo with file </li></ul><ul><li>Versioned </li></ul><ul><li>Special Properties </li></ul><ul><ul><li>svn:ignore </li></ul></ul><ul><ul><li>svn:keywords </li></ul></ul><ul><ul><li>svn:needs-lock </li></ul></ul><ul><ul><li>svn:executable </li></ul></ul>
    17. 17. Special SVN Property: svn:keywords <ul><li>Used for keyword substitution </li></ul><ul><li>Must be explicitly turned on </li></ul><ul><li>svn:keywords </li></ul><ul><ul><li>Date </li></ul></ul><ul><ul><li>Revision </li></ul></ul><ul><ul><li>Author </li></ul></ul><ul><ul><li>HeadURL </li></ul></ul><ul><ul><li>Id </li></ul></ul><ul><li>Example… </li></ul>
    18. 18. Automate Keyword Substitution <ul><li>Config file “miscellany” section </li></ul><ul><li>Applies to working copy, not repo </li></ul><ul><li>On windows, found in : </li></ul><ul><li>/%AppData%/Subversion </li></ul><ul><li>More: </li></ul><ul><li>http://svnbook.red-bean.com/nightly/en/ </li></ul><ul><li>svn.advanced.props.special.keywords.html </li></ul>
    19. 19. Hooks <ul><li>Run a program at certain points in commit process </li></ul><ul><li>Implemented as bat file in Windows </li></ul><ul><li>Live in repo, not working copy </li></ul><ul><li>Examples by default found in “repo/hooks” </li></ul><ul><li>http://svnbook.red-bean.com/nightly/en/ </li></ul><ul><ul><li>svn.reposadmin.create.html#svn.reposadmin.create.hooks </li></ul></ul>
    20. 20. Hook Types <ul><li>start-commit </li></ul><ul><li>pre-commit / post-commit </li></ul><ul><li>pre-revprop-change / post-revprop-change </li></ul><ul><li>pre-lock / post-lock </li></ul><ul><li>pre-unlock / post-unlock </li></ul>
    21. 21. Hooks: Tips <ul><li>Hook programs execute with an empty environment </li></ul><ul><li>Do not modify a commit transaction using hook scripts </li></ul><ul><li>Permissions, permissions, permissions </li></ul>
    22. 22. Hooks: Ideas <ul><li>Push code to staging server </li></ul><ul><li>Send notification emails to dev team </li></ul><ul><li>Update issue / project management software </li></ul>
    23. 23. Resources for Hooks <ul><li>Brad Wood’s Blog http://www.codersrevolution.com/index.cfm/2008/9/15/Creating-a-postcommit-hook-for-Subversion </li></ul><ul><li>Dan Switzer’s Blog </li></ul><ul><ul><li>http://blog.pengoworks.com/index.cfm/2008/2/5/Debugging-Subversion-Repository-Hooks-in-Windows </li></ul></ul>
    24. 24. Visual SVN Server <ul><li>Windows installer (visualsvn.com) </li></ul><ul><li>Installs Apache based Service </li></ul><ul><li>HTTPS/SSL Capable </li></ul><ul><li>Internally @ SVN 1.6.4 (current) as of 8/12/09 </li></ul><ul><li>Take a Look… </li></ul>
    25. 25. SVN Abstration Layer <ul><li>Provides abstraction for RIA Forge By: Rob Gonda </li></ul><ul><li>Configure via XML </li></ul><ul><li>Uses Apache by default, partial support for SVNServe </li></ul><ul><li>http://svnservice.riaforge.org/ </li></ul>
    26. 26. SVN Abstraction Layer <ul><li>Repositories </li></ul><ul><ul><li>Create, delete, list </li></ul></ul><ul><li>Users </li></ul><ul><ul><li>Create, delete, list, changepassword </li></ul></ul><ul><li>History </li></ul><ul><ul><li>List </li></ul></ul>
    27. 27. SVN Abstraction Layer: Example Code <ul><li>svnService = createObject('component', 'models.svnService').init('config/config.xml'); </li></ul><ul><li>svnService.listRepos(); </li></ul><ul><li>svnService.create(‘myRepo); </li></ul><ul><li>svnService.getLog(‘myRepo', 10); </li></ul><ul><li>svnService.addUser(‘myRepo', ‘username', ‘password'); </li></ul>
    28. 28. SVN Sync <ul><li>SVNSync – Repo Browser By: Tom de Manincor </li></ul><ul><li>Configure via XML (X2) </li></ul><ul><ul><li>config/environment.xml </li></ul></ul><ul><ul><li>model/svnAPI/config.xml </li></ul></ul><ul><li>http://svnsync.riaforge.org/ </li></ul>
    29. 29. SVN Sync <ul><li>Let’s check it out… </li></ul>
    30. 30. Roundup: RIA Forge Projects <ul><li>Deployment builder - ANT/SVN By: Matt Riley http://deploymentbuilder.riaforge.org/ </li></ul><ul><li>Skweegee - TRAC + more (formerly Trac_Fu) By: Russ Johnson http://skweegee.riaforge.org/ </li></ul>
    31. 31. Roundup: RIA Forge Projects <ul><li>SVNAuthz.cfc – Manipulate authz files By: Terrance Ryan http://svnauthz.riaforge.org/ </li></ul><ul><li>SVNUtil – AIR App, Removes .svn info By: Omar Gonzalez http://svnutil.riaforge.org/ </li></ul>
    32. 32. Resources <ul><li>Book - Version Control with Subversion http://svnbook.red-bean.com </li></ul><ul><li>Windows Installer / Admin - VisualSVN http://www. visualsvn.com </li></ul>
    33. 33. Questions? <ul><li>Contact: </li></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li>cameroncf (YIM / AIM) </li></ul></ul><ul><li>Presentation available NOW via: </li></ul><ul><ul><li>USB Thumbdrive </li></ul></ul><ul><ul><li>http://www.sumoc.com/downloads/files/svn.zip </li></ul></ul><ul><li>Take the Survey: http://tinyurl.com/cfunitedsurvey </li></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×