Version Control Marek Kochaczyk Jagiellonian University, Krakw - - PowerPoint PPT Presentation

version control
SMART_READER_LITE
LIVE PREVIEW

Version Control Marek Kochaczyk Jagiellonian University, Krakw - - PowerPoint PPT Presentation

DIKU :: GP&LD, May 2007 Version Control Marek Kochaczyk Jagiellonian University, Krakw Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References Page 1 of 8 Marek Kochaczyk,


slide-1
SLIDE 1

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 1 of 8 Marek Kochańczyk, 2007

DIKU :: GP&LD, May 2007

Version Control

Marek Kochańczyk

Jagiellonian University, Kraków

”Evolution is cleverer than you are.” (Francis Crick)

slide-2
SLIDE 2

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 2a of 8 Marek Kochańczyk, 2007

1 Purpose

❼ Collaborative sharing and edition of data. ❼ Management of changes. ’Collaborative’: It is assumed that project evolves over time: common access for publicly visible modifications. ’Data’: ❼ architectural blueprints, ❼ diagrams of electronic models, ❼ configuration files and source code.

slide-3
SLIDE 3

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 2b of 8 Marek Kochańczyk, 2007

2 Purpose

❼ Collaborative sharing and edition of data. ❼ Management of changes. Changes are identified at least by: ❼ revision number (multiple conventions), ❼ identity of the author of the change. Actions: ❼ reverting, ❼ branching & tagging.

slide-4
SLIDE 4

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 3 of 8 Marek Kochańczyk, 2007

3 Control models

Distributed

Egalitarian in the p2p sense: Every working copy is a repo, every repo is a working copy. ❼ BitKeeper/Git.

Client-Server

❼ CVS, ❼ Subversion (SVN), ❼ ClearCase (by Rational Software).

slide-5
SLIDE 5

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 4a of 8 Marek Kochańczyk, 2007

4 Client-Server Models

❼ Lock-Modify-Unlock ❼ Copy-Modify-Merge Only one person is allowed to change a file at a time, after registering a lock. Locks considered harmful – Problems: ❼ a lock holder went to Hawaii, ❼ non-overlapping edits of the same file, ❼ edits of separate yet dependent file.

slide-6
SLIDE 6

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 4b of 8 Marek Kochańczyk, 2007

5 Client-Server Models

❼ Lock-Modify-Unlock ❼ Copy-Modify-Merge Snapshot of central repository → Personal working copy Problems: ❼ disturbing out-of-dates, ❼ most conflicts have to be resolved manually, ❼ merging hell when many dependencies. In practice enables more smooth collaboration.

slide-7
SLIDE 7

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 5 of 8 Marek Kochańczyk, 2007

6 Subversion

Superiority over CVS

❼ support for binary files, ❼ designed with networking in mind (delta compression, inetd/apache/svn+ssh), ❼ atomic commits, ❼ pre-/post-commit hooks. Also plethora of GUI frontends and IDE plugins.

slide-8
SLIDE 8

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 6 of 8 Marek Kochańczyk, 2007

→ Command Line

slide-9
SLIDE 9

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 7 of 8 Marek Kochańczyk, 2007

7 Subversion – cont’d

Good practices

❼ sane repository layout, ❼ frequent commits, ❼ svn commands instead of system commands, ❼ eventual post-commit hooks.

slide-10
SLIDE 10

Purpose Purpose Control models Client-Server Models Client-Server Models Subversion Subversion References

Page 8 of 8 Marek Kochańczyk, 2007

8 References

· SVN Documentation http://svnbook.red-bean.com