• Save
Os Fitzpatrick Sussman Swp
Upcoming SlideShare
Loading in...5
×
 

Os Fitzpatrick Sussman Swp

on

  • 1,461 views

 

Statistics

Views

Total Views
1,461
Views on SlideShare
1,460
Embed Views
1

Actions

Likes
1
Downloads
0
Comments
1

1 Embed 1

http://www.techgig.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Worst practices? It could be real buisiness of most companies. So go and dump the whole svn-db and check it into an inherited repository: good luck :)
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Os Fitzpatrick Sussman Swp Os Fitzpatrick Sussman Swp Presentation Transcript

    • Subversion Worst Practices Ben Collins-Sussman & Brian W. Fitzpatrick Google OSCON: July 27, 2007
    • TOP TEN WAYS to Sabotage your Project... with Subversion!
    • 10. Argue about Version Control Systems Centralized or distributed? • • Make a checklist describing your perfect system! – Compare to all systems – Repeat this every 3 years – Stick to CVS anyway • Remember, version control is a religion
    • 9. Do a Brute-Force Transition Don!t test • • Don!t train • Just switch to Subversion ASAP • Tell users to quit whining • Toss out existing scripts and tools, start over.
    • 8. Backups? What Backups? We!ve got working copies, after all • • Or, for more fun: backup every night with quot;svnadmin dump! instead of hotcopy.
    • 7. Loads of Locales Commit interestingly encoded filenames (CJK), don!t • tell anyone else. • Hilarity ensues!
    • 6. Rule with an IRON FIST Use path-based access control everywhere • – all of your users are bad children – skip the social issues, just put up roadblocks Lock everything • – concurrent edits are dangerous! – avoid annoying conflicts – avoid annoying communication – lock, then go on vacation – take sysadmin with you
    • 5. Hide the Version Control Your users are too dumb and scared • • Don!t waste time teaching • Write scripts to guess what happened
    • 4. Use Complex Branching Schemes Protect the sanctity of the code. At all costs. • • /trunk is holy! • Give every developer their own branch – every change must be on a sub-branch! • Hire people to merge branches all day. • Confused? Consult Clearcase manual. • Tip: create all branches on the client. It!s safer.
    • 3. Put Everything in the Repository It!s just a file server, right? • • Useful things to throw in: – object code – per-user preference files – generated docs – ISO images – release tarballs
    • 2. Use a Network Drive Real server jobs are too hard to configure • • chmod -R 777 /path/to/repository • Everyone use file:/// • What could possibly go wrong?
    • 1. Really Clever Hook Scripts! Pre-commit: • – add notes, reformat the code. – checkout code, build everything, run tests, then allow commit. Post-commit: • – do another commit. – dump the whole repository.
    • 0. Edit the Repository Database Can!t figure out what to do? Open the repository • files in your editor.
    • [12:01pm] <johndoe> can I modify the age of a tag? we moved from cvs to svn and created tags for our major releases but we'd like the dates on the top directory of those tags to be correct. [12:02pm] <sussman> johndoe: yes, you can change the svn:date property attached to any revision. [12:03pm] <johndoe> sussman: I thought I did when i modified the /var/lib/svn/ repositories/models/db/reprops/5 file but the trac code browser still shows the tag being 2 days old [12:03pm] <sussman> johndoe: good lord! DO NOT edit the repository by hand!
    • Summary Ignore the docs. • “Pet the Dog Backwards” Technique: • – close eyes, envision what you want svn to be. – force it to be that!
    • Q&A Ben Collins-Sussman & Brian W. Fitzpatrick sussman@google.com fitz@google.com