collaborative development source code versioning
play

Collaborative Development & Source Code Versioning Huge thanks - PowerPoint PPT Presentation

CPSC 310 Software Engineering Lecture 5 Collaborative Development & Source Code Versioning Huge thanks to Sebastien Mosser (sebastien.mosser@unice.fr) for the slides works on piece of developer software 2 Collaborative


  1. CPSC 310 – Software Engineering Lecture 5 Collaborative Development & Source Code Versioning Huge thanks to Sebastien Mosser (sebastien.mosser@unice.fr) for the slides

  2. works on piece of developer software � 2

  3. Collaborative Development � 3

  4. � 4

  5. USB Key? Email? Shared directory? � 4

  6. ???? � 5

  7. � 7

  8. windchime(c) « Why do we version source code?» Motivations (among others)

  9. Before � 9

  10. After � 10

  11. � 11

  12. � 11

  13. BUG! � 11

  14. «not me!» «not me!» «not me!» «not me!» BUG! � 11

  15. « Why do we version source code?» To trace changes! � 12

  16. � 13

  17. � 13

  18. BUG! � 13

  19. BUG! � 13

  20. BUG! � 13

  21. ... BUG! � 13

  22. Here is the new release! � 14

  23. ??? Here is the new release! BUG! � 14

  24. ??? Here is the new release! BUG! It was working 
 2 days ago... � 14

  25. ??? Here is the new release! BUG! It was working 
 2 days ago... Can I see it? � 14

  26. « Why do we version source code?» To rollback changes! � 15

  27. � 16

  28. rollback � 16

  29. � 17

  30. � 17

  31. ??? ??? � 17

  32. ??? ??? � 17

  33. « Why do we version source code?» To share changes! � 18

  34. � 19

  35. � 19

  36. � 19

  37. Centralized Model (e.g., CVS, Subversion) � 20

  38. Shared Repository create � 21

  39. Shared Repository checkout export � 22

  40. Shared Repository � 23

  41. Shared Repository � 23

  42. Shared Repository commit � 23

  43. Shared Repository commit update � 23

  44. Shared Repository � 24

  45. Shared Repository � 24

  46. Shared Repository commit � 24

  47. Shared Repository commit � 24

  48. Shared Repository commit commit ???? � 24

  49. #1: different files Atomic operations. No problem at all! � 25

  50. #2: different part of the same file File Locking (old school) � 26

  51. #2: different part of the same file 1. lock File Locking (old school) � 26

  52. #2: different part of the same file 1. lock X reject! File Locking (old school) � 26

  53. #2: different part of the same file 1. lock X reject! File Locking (old school) � 26

  54. #2: different part of the same file 1. lock X reject! 2. unlock File Locking (old school) � 26

  55. #2: different part of the same file Automatic merge � 27

  56. � 28

  57. #3: same part of the same file Conflict! � 29

  58. � 30 http://geekandpoke.typepad.com/geekandpoke/2010/10/being-a-code-made-easy-chapter-1.html

  59. � 31 http://geekandpoke.typepad.com/geekandpoke/2010/10/being-a-code-made-easy-chapter-1.html

  60. Shared Repository commit X � 32

  61. Shared Repository update � 33

  62. Shared Repository update Conflict! � 33

  63. Shared Repository Conflict! � 34

  64. Shared Repository Conflict! � 34

  65. Shared Repository Resolved! � 34

  66. Shared Repository commit Resolved! � 34

  67. Shared Repository commit update Resolved! � 34

  68. Distributed Model (e.g., Bazaar, Git) � 35

  69. Centralized = 1 repository Distributed = N repository � 36

  70. when N = 1 , Centralized = Distributed He who can do more can do less � 37

  71. repository clone clone � 38

  72. completely offline! commit add � 39

  73. artefacts untracked lifecycle [Pro Git, #2.2] � 40

  74. artefacts unmodified untracked lifecycle add [Pro Git, #2.2] � 40

  75. artefacts unmodified untracked lifecycle modified add [Pro Git, #2.2] � 40

  76. artefacts unmodified untracked lifecycle modified add staged stage [Pro Git, #2.2] � 40

  77. artefacts unmodified untracked lifecycle modified add staged stage commit [Pro Git, #2.2] � 40

  78. artefacts unmodified untracked lifecycle modified add staged stage rm commit [Pro Git, #2.2] � 40

  79. push pull add commit � 41

  80. commit Centralized Distributed add commit push � 42

  81. Seriously? � 43

  82. Distribution! push push push pull � 44

  83. Spiderman’s Theorem «With great power comes great responsibility» � 45

  84. Best Practices A commit should be a logical unit and have a descriptive message (avoid http://whatthecommit.com/ ) Commit/Update frequently Inspect your changes before committing Don't break the build (unit tests) if not expected by the others

  85. DO VERSION Source code of any sort (Java, HTML,CSS, etc.) Images Configuration files Documentation (related to process and product) Automated Tests Files related to the project

  86. DO NOT VERSION Generated Artifacts | compiled code, documentation, etc. Local build environment information Secured information Use ignore mechanism provided by VCS For Git see: https://github.com/github/gitignore

  87. Version control strategy for your team ?

  88. Conclusions � 46

  89. Why do we version code? To trace changes! To rollback changes! To share changes! � 47 (among others)

  90. Why do we version code? To trace changes ! To rollback changes ! To share changes ! � 48 (among others)

  91. Different models for code versioning Centralized versus Distributed � 49

  92. when N = 1 , Centralized = Distributed He who can do more can do less � 50 (also works for P = NP)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend