Sunday, April 3, 2016

Practical SVN


svn checkout https://ch9:8443/svn/demo/trunk . (trunk per app)
branches, tag are not for main dev
tortoise svn command line --C:\Program Files\TortoiseSVN\bin
svn add 1.txt svn commit 1.txt -m "RTEC-1234: Comment"
svn ci -m "ci current dir implicitly"

Three types of SCM
Locking ---
Merging  --SVN
Distributed ---Git

SVN-- update as often as you can to minimize merge issue
ignore-- parent folder tsvn->property-> svn:ignore bin \n *.exe
commit changes to properties such as ignore
branch for feature/release/cutomized version

switch branch/trunk vs separate local dir for branch/trunk
checkout branch to its own loc dir vs. same loc dir as trunk with switch.
either way not affecting server.  switch+ci -- careful where committed. n
Suggested Server structure:  
branches 
tags swi
trunk

Merge--- switch loc dir to trunk --> merge branch to local working copy
-->Edit Conflict -->commit --> mark some file as "Resolvled"

Merge require switch to destination first
most common merge--re-integrate branch=> branch to trunk.

tagging-- switch to tags server directory during branching.
not really read-only but make sure do not commit
https://ch9:8443/svn/demo/tags/release-1.0.17.241

Show log-- 
search commit messages RTEC-9730 -- include Jira # better search
"stop on copy and rename"--- merged branch will only show changes on
the branch after created from trunk, much shorter
"include merged revision" --- on trunk see all branch chg from merges

Commit Monitor---
http://stefanstools.sourceforge.net/CommitMonitor.html

Branching Strategy --
per feature -- too many, merge issues.overhead
per release --- off to work on a release,better as post release 
per developer/team --CI not well supported.
Branch as needed --- best strategy
 (1) everyone work on trunk, see merge issue sooner
 (2) when release needed,branch and never merge back 
 (3) branch bug fix/hot fix stay in branch and merge back if fit
     ( trunk could have a re-write without hot fix)
 (4) CI easier and effective on trunk
 (5) never need to deal with merging unless Hot Fix.
 (6) Exception: experiemental feature branch may merge back

Merge in/Merg out ---Merge trunk to branch->resolve conflict--> test
  --> merge branch to trunk(trivial no conflicts)

"Merge a range of Revision":
(1) Cherry Picking--switch to trunk local ->merge branch to trunk->Show Log
  --> pick time or pick individual chg in the log->merge->edit conflicts
  --> commit
(2) Rollback merge --switch to trunk -->Merge trunk to trunk -->
    -->show log find the entry of the merge -->pick "reverse merge"
    --> commit => merge rollback


No comments:

Post a Comment