Subversion
---
Minni Arora
Version Control
Hey, this function doesnt work anymore. id you
chan!e somethin!"
Sorry, # cant find those old classes. # !uess youll
have to re-im$lement them.
Hey, could you send me a co$y of those chan!es
you made last %uesday"
Subversion Architecture
Subversion commands
svn add
svn blame
svn cat
svn checkout
svn commit
svn co$y
svn delete
svn diff
svn e&$ort
svn info
svn list
svn mer!e
svn move
svn $ro$edit
svn resolved
svn revert
svn status
svn switch
svn u$date
Common Command '$tions
--messa!e
svn commit --messa!e ()i&ed bu! *++,-.(
--no-auth-cache
--recursive.--non-recursive
svn revert --recursive trunk.
svn checkout --non-recursive htt$/..svn.e&am$le.com.re$os
--revision
svn checkout htt$/..svn.e&am$le.com.re$os --revision +010
2asic 3ork Cycle
4$date your workin! co$y 5svn u$date6
Make chan!es 5svn add, svn delete, svn co$y,
svn move6
7&amine your chan!es 5svn status, svn diff6
8ossibly undo some chan!es 5svn revert6
9esolve conflicts 5svn u$date, svn resolve6
Commit your chan!es 5svn commit6
Handlin! Conflicts
:
; ls trunk.
:
hello.c / file with conflicts
:
hello.c.mine / local workin! co$y version before conflict
:
hello.c.r< / file when checkedout
:
hello.c.r= / file in the re$ository bein! mer!ed
2ranchin!, %a!!in! and Mer!in!
9e$ository layout .trunk, .branches, .ta!s
svn c$ --messa!e (Created a new branch(
htt$/..svn.e&am$le.com.$ro>.trunk
htt$/..svn.e&am$le.com.$ro>.branches.mybranch
svn c$ --messa!e (Created a new ta!(
htt$/..svn.e&am$le.com.$ro>.branches.mybranch
htt$/..svn.e&am$le.com.$ro>.ta!s.myta!
svn mer!e htt$/..svn.e&am$le.com.$ro>.ta!s.myta!
8ro$erties
Versioned $ro$erties
: svn $ro$set $ro$erty?key ($ro$erty value( re$os.trunk.foo.$h$
: svn $ro$!et $ro$erty?key re$os.trunk.foo.$h$
4nversioned . revision $ro$erties
: svn $ro$set --rev$ro$ --revision 111, $ro$erty?key ($ro$erty value(
re$os.trunk.foo.$h$
: svn $ro$!et --rev$ro$ --revision 111, $ro$erty?key re$os.trunk.foo.$h$
:
2uilt-in $ro$erties
: svn/e&ternals
: svn/mime-ty$e
: svn/s$ecial
: svn/author
: svn/date
: svn/lo!
Hooks
Scripts that run automatically on the server, examine the data that flows
into the repository and make decisions about whether specific actions
should be allowed as well as trigger some more actions.
start-commit
$re-commit
$ost-commit
$re-rev$ro$-chan!e
$ost-rev$ro$-chan!e
How to make most of Hooks -
Access control
Send emails
Communicate with issue tracker
Send notifications via 9SS
evelo$ment 8rocess 8olicies
2ranchin! 8olicies
3hen to create a task branch"
3hat !ranularity of task re@uires a
branch"
How to or!aniAe branches"w to
or!aniAe ta!s"
%a!!in! 8olicies
3hen to ta!"
How to or!aniAe ta!s"
Mer!in! 8olicies
3hen to mer!e"
3ho should mer!e"
ocumentin! mer!es
Bo!!in! 8olicies
State the s$ecific issue resolved and
why the issue needed solvin!
Any known side effects
3as anythin! removed
onCt use source code. onCt list the
files chan!ed
Dee$ short
or!aniAe ta!s"
7nforce 8olicies
7ffective Communication