Download presentation
Presentation is loading. Please wait.
1
Version Control with Subversion (SVN)
2
What are you going to learn about today?
Subversion (SVN)! Version control with… Eclipse Subversive plug-in particulars
3
Revision Control (aka Version Control): Management of change history for artifacts, such as code, documents, etc. Why is revision control important? Recover old versions Manage multiple releases “Who broke the build?” What version control systems (VCS) have you heard of? Local-only: RCS Client-Server: CVS, Subversion Distributed: Git, Mercurial
4
Client-Server Version-Control Model
Repository Client HEAD rev1 What do you suppose svn checkout does?
5
Repository Client svn checkout working copy HEAD rev1
6
What do you suppose svn commit does?
Repository Client working copy HEAD rev1 edits/changes What do you suppose svn commit does?
7
Repository Client working copy rev1 svn commit HEAD rev2
8
What do you suppose svn commit does in this case?
Repository Client working copy rev1 HEAD rev2 more edits/changes What do you suppose svn commit does in this case?
9
But how do you get at the old revisions?
Repository Client working copy rev1 svn commit rev2 But how do you get at the old revisions? HEAD rev3
10
Repository Client rev1 rev2 HEAD rev3 working copy
client can checkout old revisions if he/she wants to HEAD rev3
11
Repository Client rev1 rev2 HEAD rev3 working copy
If (this or another) client does checkout without specifying the revision, he/she will get the HEAD revision HEAD rev3
12
Now let’s consider a more detailed example
13
Trunk/Branches/Tags Schema
“main” development branch A MyProj trunk B “side” branches (don’t use in this class) C branches tags v1.0 A B archived version snapshots
14
Repository Client rev305 A MyProj trunk B C branches tags
15
Repository Client rev305 working copy svn checkout A MyProj trunk B A
branches B C tags
16
Repository Client rev305 working copy
A working copy MyProj trunk B A C trunk branches B C tags Note: User can name this folder whatever he/she wants
17
Repository Client rev305 working copy User edits a file A MyProj trunk
B A C trunk branches B’ C tags User edits a file
18
Repository Client rev306 working copy svn commit A MyProj trunk B’ A C
branches B’ C tags
19
Repository Client rev306 working copy
A working copy MyProj trunk B’ A C trunk branches B’ C tags How would the user tag this revision of the trunk?
20
Repository Client rev307 working copy svn copy A MyProj trunk B’ A C
branches B’ C A tags HW0 B’ C
21
User edits a file What would commit do?
Repository Client rev307 A working copy MyProj trunk B’ A C trunk branches B’ C’ A tags HW0 B’ C User edits a file What would commit do?
22
Repository Client rev308 working copy svn commit A MyProj trunk B’ A
branches B’ C’ A tags HW0 B’ C
23
Repository Client rev308 working copy
A working copy MyProj trunk B’ A C’ trunk branches B’ C’ A tags HW0 B’ C User can checkout/edit tagged copy if he/she wants to
24
Repository Client rev308 working copy User creates a new file A MyProj
trunk B’ A C’ trunk branches B’ C’ A D tags HW0 B’ C User creates a new file
25
What would commit do now?
Repository Client rev308 A working copy MyProj trunk B’ A C’ trunk branches B’ C’ A D tags HW0 B’ C What would commit do now?
26
Nothing! User must svn add the file
Repository Client rev308 A working copy MyProj trunk B’ A C’ trunk branches B’ C’ A D tags HW0 B’ C Nothing! User must svn add the file
27
Now the commit will do something
Repository Client rev309 A working copy MyProj trunk B’ svn commit A C’ trunk branches B’ D C’ A D tags HW0 B’ C Now the commit will do something
28
Some basic SVN client operations
Getting started: import checkout Keeping synced commit update revert Comparing w/ repos status diff File management add remove move copy Repos history/inspection log cat list Getting non-svn copy export Underlined operations are the ones I just covered. Your SVN client (e.g., Eclipse Subversive plug-in) exposes these and/or uses them “under the hood”
29
Time for a demonstration with Eclipse/Subversive
Time for a demonstration with Eclipse/Subversive
30
Summary SVN version control Basic SVN operations
Summary SVN version control Basic SVN operations
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.