Your SlideShare is downloading. ×
Subversion
  Worst Practices

Ben Collins-Sussman & Brian W. Fitzpatrick
                 Google
          OSCON: July 27,...
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...
9. Do a Brute-Force Transition

  Don!t test
•
• Don!t train
• Just switch to Subversion ASAP
• Tell users to quit whining...
8. Backups? What Backups?

  We!ve got working copies, after all
•
• Or, for more fun: backup every night with quot;svnadm...
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
    – s...
5. Hide the Version Control

  Your users are too dumb and scared
•
• Don!t waste time teaching
• Write scripts to guess w...
4. Use Complex Branching Schemes

  Protect the sanctity of the code. At all costs.
•
• /trunk is holy!
• Give every devel...
3. Put Everything in the Repository

  It!s just a file server, right?
•
• Useful things to throw in:
  – object code
  – p...
2. Use a Network Drive

  Real server jobs are too hard to configure
•
• chmod -R 777 /path/to/repository
• Everyone use fil...
1. Really Clever Hook Scripts!

    Pre-commit:
•
    – add notes, reformat the code.
    – checkout code, build everythin...
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...
Summary

    Ignore the docs.
•


    “Pet the Dog Backwards” Technique:
•
    – close eyes, envision what you want svn to...
Q&A
Ben Collins-Sussman & Brian W. Fitzpatrick
          sussman@google.com
             fitz@google.com
Upcoming SlideShare
Loading in...5
×

Os Fitzpatrick Sussman Swp

773

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
  • 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 :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
773
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Os Fitzpatrick Sussman Swp"

  1. 1. Subversion Worst Practices Ben Collins-Sussman & Brian W. Fitzpatrick Google OSCON: July 27, 2007
  2. 2. TOP TEN WAYS to Sabotage your Project... with Subversion!
  3. 3. 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
  4. 4. 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.
  5. 5. 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.
  6. 6. 7. Loads of Locales Commit interestingly encoded filenames (CJK), don!t • tell anyone else. • Hilarity ensues!
  7. 7. 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
  8. 8. 5. Hide the Version Control Your users are too dumb and scared • • Don!t waste time teaching • Write scripts to guess what happened
  9. 9. 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.
  10. 10. 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
  11. 11. 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?
  12. 12. 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.
  13. 13. 0. Edit the Repository Database Can!t figure out what to do? Open the repository • files in your editor.
  14. 14. [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!
  15. 15. Summary Ignore the docs. • “Pet the Dog Backwards” Technique: • – close eyes, envision what you want svn to be. – force it to be that!
  16. 16. Q&A Ben Collins-Sussman & Brian W. Fitzpatrick sussman@google.com fitz@google.com

×