1 / 19

Source Control

Source Control. Dr. Scott Schaefer. Version Control Systems. Allow for maintenance and archiving of multiple versions of code / other files Designed for text files… can be used with other files, but some functionality won’t work Saves multiple copies of the same file

anais
Download Presentation

Source Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Source Control Dr. Scott Schaefer

  2. Version Control Systems • Allow for maintenance and archiving of multiple versions of code / other files • Designed for text files… can be used with other files, but some functionality won’t work • Saves multiple copies of the same file • Tracks changes to each file among multiple users • Allows multiple users to edit the same file at the same time

  3. Subversion • Open-source version control system • Builds on CVS • Can handle local or remote repositories • Stores and transfers diffs of files… not entire files (efficient)

  4. Example Repository User 1 X Z Y User 2

  5. Example Repository User 1 add X add Y X Z add Z Y User 2

  6. Example Repository User 1 Commit X Z 1 X Z Y Y User 2

  7. Example Repository User 1 X Z 1 X Z Y Y User 2 Checkout X Z Y

  8. Example Repository User 1 Modify Y X Z 1 X Z Y Y User 2 X Z Y

  9. Example Repository User 1 Commit X Z 1 X Z Y Y X Z 2 User 2 Y X Z Y

  10. Example Repository User 1 X Z 1 X Z Y Y X Z 2 User 2 Update Y X Z Y

  11. Example Repository User 1 Modify X X Z 1 X Z Y Y X Z 2 User 2 Modify X Y X Z Y

  12. Example Repository User 1 X Z 1 X Z Y Y X Z 2 User 2 Commit Y X Z X Z Y 3 Y

  13. Example merged text! Repository User 1 Update X Z 1 X Z Y Y X Z 2 User 2 Y X Z X Z Y 3 Y

  14. Another Example Repository User 1 Delete Z X Z 1 X Y Y User 2 X Z Y

  15. Another Example Repository User 1 Commit X Z 1 X Y Y X 2 User 2 Y X Z Y

  16. Another Example Repository User 1 X Z 1 X Y Y X 2 User 2 Update Y X Y

  17. Conflicts • Happen when you and someone else edit the same line of code <<<<<<<<< .mine Your change ========= Someone else’s change >>>>>>>>> .r 23 • Subversion keeps both your original (foo.mine) and the revision (foo.23)

  18. Living with Version Control • ALWAYS update before you commit changes • If files change during the update, make sure everything works before you commit • If you have a conflict, you MUST resolve the conflict before committing • Update often to avoid conflicts • Add descriptions to all of your commits

  19. Your Project • You MUST use version control for all of your projects • I strongly suggest using Google Code as your SVN server • You can access it from anywhere

More Related