Your SlideShare is downloading. ×
0
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Os Fitzpatrick Sussman Swp

764

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
764
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×