DOC PREVIEW
Princeton COS 333 - Source code management

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Source code management • Subversion (SVN): version control system• for managing large projects with multiple people– widely used, open source– works across network as client-server– fixes many of shortcomings of CVS• store and retrieve all versions of all directories and files in a project– usually source code– also documentation, tests, binaries, ...• support multiple concurrent users– independent editing of files– merged into single version• highly recommended for COS 333 projects!– save all previous versions of all files so you can back out of a bad change– log changes to files so you can see who changed what and why– mediate conflicting changes made by different users -- keeps consistencyBasic sequence• create a repository– where SVN stores its copies of your files– including all changes made by anyone• each person checks out a copy of the files– "copy - modify - merge"– get files from repository to work ondoes not lock the repository– make changes in a local copy– when satisfied, check in (== commit) changes• if my changes don't conflict with your changes– SVN updates its copies with the revised versions– edits on different lines are merged automatically– keeps previous copies • if my changes conflict with your changes– e.g., we both changed lines in the same part of file,SVN doesn't permit the checkin– we have to resolve the conflict manuallyBasic sequence, continued• when changes are committed, SVN insists on a log message– strong encouragement to record what change was made and why– can get a history of changes to one or more files– can diff versions of a file• can create multiple branches of a project• can tag snapshots for e.g., releases• can be used as client-server, so can do distributed development– repository on one machine– users and their local copies can be anywhereGetting started• to put code under SVN control, do this once:svnadmin create repositorysvn import proj.dir file:///repository \-m 'initial repository'svn checkout file:///repository working.dir• create, edit files in working.dircd working.dired x.c # etc.svn diff x.csvn add newfile.c• update the respositorysvn commit # commit all the changes • for more info, read svn.help on web page, SVN book, etc.Alternatives• Bazaar http://bazaar-vcs.org• Mercurial http://www.selenic.com/mercurial• Githttp://git-scm.com/• comparison


View Full Document

Princeton COS 333 - Source code management

Download Source code management
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Source code management and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Source code management 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?