Version Control with Subversion (SVN) flic.kr/p/6oP7x7

28 Slides3.85 MB

Version Control with Subversion (SVN) http://flic.kr/p/6oP7x7

What are you going to learn about today? Subversion (SVN)! Version control with Eclipse Subversive plug-in particulars http://flic.kr/p/8JpkTg

Basic Version-Control Model Repository HEAD rev1 Client

Basic Version-Control Model Repository HEAD rev1 Client svn checkout working copy

Basic Version-Control Model Repository HEAD rev1 Client working copy edits/changes

Basic Version-Control Model Repository Client rev1 sv n HEAD rev2 it m co m working copy

Basic Version-Control Model Repository rev1 HEAD rev2 Client working copy more edits/changes

Basic Version-Control Model Repository Client working copy rev1 rev2 HEAD rev3 c n sv m m o it

Basic Version-Control Model Repository rev1 rev2 HEAD rev3 Client working copy client can checkout old revisions if he/she wants to

Basic Version-Control Model Repository rev1 rev2 HEAD rev3 Client working copy If (this or another) client does checkout without specifying the revision, he/she will get the HEAD revision

Now let’s consider a more detailed example

Repository Client rev305 MyProj A trunk B C branche s tags

Repository Client rev305 MyProj A trunk B C branche s tags working copy svn che c kout A trunk B C

Repository Client rev305 MyProj A trunk working copy B A C branche s trunk B C tags Note: User can name this folder whatever he/she wants

Repository Client rev305 MyProj A trunk working copy B A C branche s trunk B’ C tags User edits a file

Repository Client rev306 MyProj A trunk B’ C branche s tags working copy svn commit A trunk B’ C

Repository Client rev306 MyProj A trunk working copy B’ A C branche s trunk B’ C tags How would the user tag this revision of the trunk?

Repository rev307 A trunk svn MyProj co p y Client B’ working copy A C trunk branche s tags B’ C A HW0 B’ C

Repository Client rev307 MyProj A trunk working copy B’ A C trunk branche s tags B’ C’ A HW0 B’ C User edits a file

Repository Client rev308 MyProj A trunk working copy B’ svn commit C’ trunk branche s tags A B’ C’ A HW0 B’ C

Repository Client rev308 MyProj A trunk working copy B’ A C’ trunk branche s tags B’ C’ A HW0 B’ C User can checkout/edit tagged copy if he/she wants to

Repository Client rev308 MyProj A trunk working copy B’ A C’ branche s tags B’ trunk C’ A HW0 D B’ C User creates a new file

Repository Client rev308 MyProj A trunk working copy B’ A C’ branche s tags B’ trunk C’ A HW0 D B’ C What would happen if the user were to commit?

Repository Client rev308 MyProj A trunk working copy B’ A C’ branche s tags B’ trunk C’ A HW0 D B’ C Nothing. User must svn add the file

Repository Client rev309 MyProj A trunk working copy B’ svn commit C’ branche s tags A B’ trunk D C’ A HW0 D B’ C Now the commit will do something

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 Your SVN client (e.g., Eclipse Subversive plug-in) exposes these and/or uses them “under the hood”

Time for a demonstration with Eclipse/Subversive http://flic.kr/p/5dfuqL

Summary SVN version control Basic SVN operations http://flic.kr/p/YSY3X

Back to top button