Subversion: Difference between revisions

From miki
Jump to navigation Jump to search
Line 38: Line 38:
</source>
</source>
* From now on:
* From now on:
** Either delete the branch
** Either delete the branch<br/><source lang=bash>
svn delete ^/branches/topic
<source lang=bash>
svn rm ^/branches/topic
</source>
</source>
** Or merge trunk back to the branch so that '''subsequent merges do not generate conflicts'''.<br/>This steps is necessary to tell svn that it should ignore the merged revision on the trunk at the next branch reintegration):
** Or merge trunk back to the branch so that '''subsequent merges do not generate conflicts'''.<br/>This steps is necessary to tell svn that it should ignore the merged revision on the trunk at the next branch reintegration):
<source lang=bash>
<source lang=bash>cd branches/topic
cd branches/topic
svn merge --record-only -c 555 ^trunk
svn merge --record-only -c 555 ^trunk
svn commit
svn commit

Revision as of 14:13, 15 December 2011

References

Configuration

  • Colored diff — Either define colordiff as diff-cmd in ~/.subversion/config:
  • diff-cmd = colordiff
    

    However, to keep the internal svn diff tool, you need to define your own function & alias. This will also highlight diff header in green:

    function svnwrap()
    {
        if [ "$1" = "diff" ] ; then
    		"svn" "$@" | colordiff | less -FRX
    	else
    		"svn" "$@"
    	fi
    }
    alias svn=svnwrap
    

    To page the output, use | less -R

Workflows

Branch integration

From [1]:

  • Create a new branch off the trunk
  • Work on the branch
  • Merge (reintegrate) the branch into trunk
cd trunk
svn merge --reintegrate ^/branches/topic
svn commit
# Committed revision 555. 
# # this revision is ^^^^ important
  • From now on:
    • Either delete the branch
      svn delete ^/branches/topic
      
    • Or merge trunk back to the branch so that subsequent merges do not generate conflicts.
      This steps is necessary to tell svn that it should ignore the merged revision on the trunk at the next branch reintegration):
cd branches/topic
svn merge --record-only -c 555 ^trunk
svn commit

Commands

status (st)

Show modified/new/... files in the working copy.

svn status

propget (pg)

svn propget svn:mergeinfo

info

svn info .
svn info /dir/file

Examples

  • Checking out a project
svn co svn+ssh://ftp.noekeon.org/opt/www/daemenj/web/private/SVN/Keccak