sv Command Referencesv infoInfo reports information about the current branch. $ sv info
sv: svn info --xml
sv: current branch: trunk (https://sv-subversion.googlecode.com/svn/trunk)
sv: using repository layout:
trunk = https://sv-subversion.googlecode.com/svn/trunk
branches = https://sv-subversion.googlecode.com/svn/branches
tags = https://sv-subversion.googlecode.com/svn/tags
current url = https://sv-subversion.googlecode.com/svn/trunk sv understands any repository that uses the standard names "trunk," "branches," and "tags" sv create branch_name base_branch(trunk)Creates a new branch off of trunk (default) or another branch $ sv create sample_branch
sv: svn info --xml
sv: current branch: trunk (https://sv-subversion.googlecode.com/svn/trunk)
sv: svn cp https://sv-subversion.googlecode.com/svn/trunk https://sv-subversion.googlecode.com/svn/branches/sample_branch -m "creating branch sample_branch" sv branchesLists available branches $ sv branches
sv: svn info --xml
sv: current branch: trunk (https://sv-subversion.googlecode.com/svn/trunk)
sv: svn ls --xml https://sv-subversion.googlecode.com/svn/branches
['sample_branch'] sv switch branch_nameMakes sure your working copy is clean before switching to a branch $ sv switch sample_branch
sv: svn info --xml
sv: current branch: trunk (https://sv-subversion.googlecode.com/svn/trunk)
sv: svn status --xml
sv: svn ls --xml https://sv-subversion.googlecode.com/svn/branches
sv: svn switch https://sv-subversion.googlecode.com/svn/branches/sample_branch
At revision 3.
sv: svn up
sv: svn revert -R . switching on a dirty working copy: $ sv switch trunk
sv: svn info --xml
sv: current branch: sample_branch (https://sv-subversion.googlecode.com/svn/branches/sample_branch)
sv: svn status --xml
Error: Working copy has local modifications:
sample_file
Commit or revert the changes sv mergeback parent_branchMerges the current branch into trunk (or the specified parent branch). Will not operate on dirty working copies. Don't forget to commit the merge! $ sv mergeback
sv: svn info --xml
sv: current branch: sample_branch (https://sv-subversion.googlecode.com/svn/branches/sample_branch)
sv: svn status --xml
sv: svn log -v --stop-on-copy --xml
sv: svn switch https://sv-subversion.googlecode.com/svn/trunk
D sample_file
Updated to revision 4.
sv: svn up
sv: svn revert -R .
sv: svn merge -r3:HEAD https://sv-subversion.googlecode.com/svn/branches/sample_branch
A sample_file sv rebase parent_branchCreates a new version of your work branch based on the latest changes from trunk. Specifically, it searches through the logs to find the parent branch (typically trunk) of the current working branch and creates a new branch named branch_name.merge_counter by copying the parent branch. Next, it merges forward the changes in the current branch (from the branch point to HEAD) onto the new copy of the parent branch. Note: you have to manually resolve conflicts (if there are any) and commit the changes merged in from the last version of the branch. Subsequent switches and rebases will use the latest rebase of their parent branch so you can basically ignore that they exist (my_branch.1, my_branch.2, etc). Why rebase a branch? This method keeps your diff and history clean. Other tools pull changes in from trunk, which dirties your branch diffs making it hard to code review. Having larger diffs in a repository where multiple developers have their own work branches can otherwise increase the likelihood of future merge conflicts. For example, if directories get renamed in trunk, carrying that diff around in multiple work branches would make it cumbersome to merge all work branches together. It also makes the developer himself responsible for keeping works-in-progress in sync with trunk ;) $ sv rebase
sv: svn info --xml
sv: current branch: sample_branch (https://sv-subversion.googlecode.com/svn/branches/sample_branch)
sv: svn status --xml
sv: svn log -v --stop-on-copy --xml
sv: svn cp https://sv-subversion.googlecode.com/svn/trunk https://sv-subversion.googlecode.com/svn/branches/sample_branch.1 -m "creating branch sample_branch.1"
sv: svn ls --xml https://sv-subversion.googlecode.com/svn/branches
sv: svn switch https://sv-subversion.googlecode.com/svn/branches/sample_branch.1
D sample_file
Updated to revision 5.
sv: svn up
sv: svn revert -R .
sv: svn merge -r3:HEAD https://sv-subversion.googlecode.com/svn/branches/sample_branch
A sample_file Other commands$ sv
branchdiff - display a diff from stop-on-copy to HEAD
branches - list branches
create - [branch_name] create a branch
diff_files - None
difftotag - [tag] display a diff of this branch against an arbitrary tag
difftotrunk - display a diff of this branch against trunk
info - display sv info
log - display svn log --stop-on-copy
mergeback - merge the current branch back into trunk
rebase - [branch=trunk] merge the current branch into a new copy of the specified branch or the previous parent of the branch
revert - svn revert -R .
switch - [branch_name] switch to latest merge forward for a branch
switchtag - [tag_name] switch to a tag
tag - tag the current branch
tags - list tags
|