Download presentation
Presentation is loading. Please wait.
1
Concurrent Version Control
2
Introduction What is concurrent version control?
A software package for simplifying team development of software Why use a version/content control system? Keeps track of changes made to files under its control Allows multiple team members to work on a set of project files concurrently Others Protect yourself from yourself by preserving old version; can undo changes that don’t work out Recording an audit trail to show progress made
3
Two Major Issues Version Control Content control
Maintain prior and current versions of files Allow retrieval of prior versions if necessary Allow auditing of changes made over time Content control Manage concurrent access Support resolution of conflicts (e.g. two developers make changes in one file at the same time)
4
Two Major Models Client-Server Distributed Repository on server
Clients interact with server Examples: SVN, Team Foundation Server Distributed Each working node keeps a local repository Exchange of changes follows local work Examples: Git, Mercurial
5
Example Products CVS (Concurrent Versioning System)
Early historical product Subversion – currently available at UWEC “A better CVS” – open source, easier to work with Variants of this Visual SVN Other popular products: Git, Mercurial, Team Foundation Server (MS) Often now combined with hosting: e.g. Bitbucket (for Git and Mercurial) Many more 3rd Party Commercial and Open Source Products
6
Introduction to Subversion
What does Subversion Do? Records creation and modification history of files Efficiently records every version Helps developers work concurrently by providing “check-in”, “check-out”, and “synchronize” What can I do with Subversion? Get existing file Publish new version for common use Compare differences between versions Create, delete, change permissions, etc.
7
SVN Concepts (1) Has two parts (client-server model): Server Clients
Controls access to common repository of resources Runs on separate server machine Clients Use access to server to create local copies for editing Come in a variety of forms: command line, Windows App, Plug-in Repository Developer 1 2 3 4
8
SVN Concepts (2) Terminology: Repository Working Copy or Workspace
Location of common copy of files Subversion Server controls access to this special file structure Working Copy or Workspace Copy of files on your local drive (generally H: or W: drive for us) Project A complete development task in a folder/directory Can include models, packages, source and other sub-folders, code, graphics, config files, … Check Out Get working copy from the Repository Commit / Check In Process of saving changes to the Repository Synchronize or Update Process of updating the local files to correspond with the repository Conflict A disagreement between an edited file in the Workspace and the copy in the Repository
9
Control Models Pessimistic Model
Files become locked on check-out Only that person with check-out copy can make changes Optimistic Model (CVS, Subversion, others) Files not locked on check-out Conflicts are managed at check-in (rare) On check-in, official repository copy is compared with new copy Check timestamp Line-by-line comparison - Changes to different lines OK - Changes to same lines rejected/mediated
10
Example Angela and Hassan both have copies of a.java#5
Angela commits her changes Creates a.java#6 Then Hassan wants to commit his changes Conflict!
11
Issues How many versions of a file do you need to keep in the repository? Just one; you can get at older versions (e.g. your “backup copy”) through Subversion, and the repository is/should be backed up How are the old versions of files stored? A baseline version is created at the beginning, and at each revision some sort of record of the changes is stored Whole copies of new versions are not kept (expensive in terms of storage)
12
Version Control Concepts (6)
What if I have a “risky” development task that I’m not sure I want to integrate into the source? You can develop a separate branch and merge back into the trunk later (see online documentation) Overall, Subversion does not have a good reputation for parallel development, as merging takes time and energy
13
Basics of Using Subversion with TortoiseSVN
- TortoiseSVN – windows explorer-based client - Assume Subversion repository on server - Getting Set Up Create directory for work on local system Create files in directory At directory level, right click, TortoiseSVN, Import Specify URL of repository, click OK Files in directory will be added to repository
14
Basics of Using Subversion with TortoiseSVN (2)
Assume Subversion repository on server Working with Files Go to local working directory, clear out contents that may have same names On that folder, right-click, SVN Checkout Specify the URL of Repository Specify the Checkout directory (your local directory above) If don’t want subfolders, check “Only check out the top folder”; choose revision you want, OK
15
Basics of Using Subversion with TortoiseSVN (3)
Assume Subversion repository on server Working with Files (2) Files will be transferred to local directory On folder, right-click, SVN Update (if time passed) to ensure files are current as to repository Make changes to local file(s) On folder, right-click, SVN Commit Can add message if desired; OK Changed files committed to repository
16
Basics of Using Subversion Under Eclipse
Assume Subversion repository on server Change Eclipse perspective to SVN Repository Exploring Add the project under Subversion control Checkout working copy of project Update local copy (if time has passed) To ensure you are consistent with current version Modify local files Only the ones for which you’re responsible Commit changes to repository Only after EXTENSIVE TESTING
17
Concurrent Version Control and Security
http uses a very basic level of security (user/pass to base 64 encoding) Access to repository relatively (but not entirely) secure in switched network Access to SVN repository insecure if on wireless, hub, etc. https is better (user/pass is encrypted)
18
References “Version Control with Subversion” – online book
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.