Using SVN - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Using SVN

Description:

Several people working on project (file) simultaneously. Merge changes ... Resolve conflicts: open conflicted files, edit them and mark as resolved ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 23
Provided by: SteveD92
Category:
Tags: svn | conflicted | using

less

Transcript and Presenter's Notes

Title: Using SVN


1
Using SVN
  • Version control with Subversion

2
What is version control?
  • Keep track of revisions
  • Investigate changes and revert
  • Several people working on project (file)
    simultaneously
  • Merge changes

3
Why do I need version control?
  • A place to store your code
  • Historical record of what was done over time
  • Synchronization between developers
  • Developer not tied to one machine
  • Work from home
  • Work from any machine
  • Best practice

4
Typical client/server system
5
The problem to avoid
6
Lock-modify-unlock
7
Copy-modify-merge
8
Copy-modify-merge (cont.)
9
Directory layout
  • /trunk all sources
  • /tags special revisions e.g. releases
  • /branches different paths in development
  • All are cheap copies

10
Command Lineimporting a directory to svn
  • svn import /tmp/myproject file///path/to/repos/
    myproject -m "initial import"
  • Adding /tmp/myproject/branches
  • Adding /tmp/myproject/tags
  • Adding /tmp/myproject/trunk
  • Adding /tmp/myproject/trunk/foo.c
  • Adding /tmp/myproject/trunk/bar.c
  • Adding /tmp/myproject/trunk/Makefile
  • Committed revision 1.

11
Standard Cycle
  • Checkout/update
  • svn checkout (checking out a new repository)
  • svn update (updating your local files with the
    last revision of the repository)
  • Edit files
  • Update (merge)
  • Resolve conflicts open conflicted files, edit
    them and mark as resolved
  • svn resolved filename.txt
  • Commit
  • With a comment to provide information to other
    users

12
Best Practices
  • Commit early and often
  • Commit logical units
  • Dont break the build (unit tests must run)
  • Communicate with team members
  • JIRA

13
What to store?
  • Source code
  • HTML, CSS, Javascript
  • Images
  • Configuration files
  • Unit and other automated tests
  • Everything required for your app to run

14
What to store (cont.)?
  • Requirements documents
  • Documentation user
  • Most documents/files related to your project

15
What not to store
  • Compiled code
  • Generated code
  • Generated documentation
  • Secured information (TBD)
  • Id/password files
  • License keys

16
Why SVN over CVS?
  • Versioning for Files, Directories and Metadata
  • Atomic commits
  • Excellent network support (speed)
  • Cheap Branching, Tagging, and Merging
  • True Cross-Platform Support (runs very well on
    Windows)

17
SVN Over CVS (cont.)
The goal of the Subversion project is to build a
version control system that is a compelling
replacement for CVS in the open source community.
  • Same developers as CVS
  • Solve CVSs problems
  • Majority of open source projects
  • Are using SVN
  • Are planning to migrate to SVN

18
Subversion Clients
  • Subclipse
  • TortoiseSVN
  • Command line

19
TortoiseSVN
  • Context menus in Windows Explorer
  • http//tortoisesvn.tigris.org/ExplorerIntegration.
    html
  • Texas AM tutorial
  • http//tagd.cs.tamu.edu/resources/WeeklyStuff/sour
    ce_control.ppt

20
Repository Organization
  • Per-project directories
  • Three sub-directories
  • Trunk
  • Tags
  • Branches
  • Fine-grained security

21
Security
  • Write to your projects
  • Read everything (some exceptions)
  • Code sharing/snooping
  • How did she do that?

22
Resources - Books
  • Version Control with Subversion
  • http//safari.oreilly.com/
  • http//svnbook.red-bean.com/
  • Pragmatic Version Control Using Subversion
  • http//www.pragmaticprogrammer.com/titles/svn2/ind
    ex.html
Write a Comment
User Comments (0)
About PowerShow.com