Version Control with Subversion SVN http flic krp6
Version Control with Subversion (SVN) http: //flic. kr/p/6 o. P 7 x 7
What are you going to learn about today? • Subversion (SVN)! • Version control with… • Eclipse Subversive plug-in particulars http: //flic. kr/p/8 Jpk. Tg
Basic Version-Control Model Repository HEAD rev 1 Client
Basic Version-Control Model Repository HEAD rev 1 Client svn checkout working copy
Basic Version-Control Model Repository HEAD rev 1 Client working copy edits/changes
Basic Version-Control Model Repository Client rev 1 o c n sv it m m HEAD rev 2 working copy
Basic Version-Control Model Repository rev 1 HEAD rev 2 Client working copy more edits/changes
Basic Version-Control Model Repository Client working copy rev 1 rev 2 HEAD rev 3 m m sv o c n it
Basic Version-Control Model Repository rev 1 rev 2 HEAD rev 3 Client working copy client can checkout old revisions if he/she wants to
Basic Version-Control Model Repository rev 1 rev 2 HEAD rev 3 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 rev 305 My. Proj A trunk B C branches tags
Repository Client rev 305 My. Proj A trunk B C branches tags working copy svn chec kout A trunk B C
Repository Client rev 305 My. Proj A trunk working copy B A C branches trunk B C tags Note: User can name this folder whatever he/she wants
Repository Client rev 305 My. Proj A trunk working copy B A C branches trunk B’ C tags User edits a file
Repository Client rev 306 My. Proj A trunk B’ C branches tags working copy svn com mit A trunk B’ C
Repository Client rev 306 My. Proj A trunk working copy B’ A C branches trunk B’ C tags How would the user tag this revision of the trunk?
Repository Client cop A trunk svn My. Proj y rev 307 B’ working copy A C trunk branches A tags HW 0 B’ C
Repository Client rev 307 My. Proj A trunk working copy B’ A C trunk branches C’ A tags HW 0 B’ B’ C User edits a file
Repository Client rev 308 My. Proj A trunk working copy B’ svn com mit C’ trunk branches A tags A HW 0 B’ C’
Repository Client rev 308 My. Proj A trunk working copy B’ A C’ trunk branches A tags HW 0 B’ C’ B’ C User can checkout/edit tagged copy if he/she wants to
Repository Client rev 308 My. Proj A trunk working copy B’ A C’ branches A tags B’ trunk HW 0 C’ D B’ C User creates a new file
Repository Client rev 308 My. Proj A trunk working copy B’ A C’ branches A tags B’ trunk HW 0 C’ D B’ C What would happen if the user were to commit?
Repository Client rev 308 My. Proj A trunk working copy B’ A C’ branches A tags B’ trunk HW 0 C’ D B’ C Nothing. User must svn add the file
Repository Client rev 309 My. Proj A trunk working copy B’ svn com mit C’ branches B’ trunk D A tags A HW 0 C’ 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 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/5 dfuq. L
Summary • SVN version control • Basic SVN operations http: //flic. kr/p/YSY 3 X
- Slides: 28