SVK::Co...:Branch(3)
π SVK::Co...:Branch π
okay bestie, gather round β this is the manual page for SVK::Command::Branch, the bit of SVK that lets you manage a project together with all its branches. No cap, it's the branch wrangler. π
β¨ SYNOPSIS β¨
branch --create BRANCH [DEPOTPATH]
branch --list [--all]
branch --create BRANCH [--tag] [--local] [--switch-to] [--from|--from-tag BRANCH|TAG] [DEPOTPATH]
branch --move BRANCH1 BRANCH2
branch --merge BRANCH1 BRANCH2 ... TARGET
branch --checkout BRANCH [PATH] [DEPOTPATH]
branch --delete BRANCH1 BRANCH2 ...
branch --setup DEPOTPATH
branch --push [BRANCH]
branch --pull [BRANCH]
branch --offline [BRANCH]
branch --online [BRANCH]
πΈ OPTIONS πΈ
-l [--list]β lists out the branches for this project π¦--list-projectsβ lists the projects that are avaliable π--createβ makes a brand new branch, main character moment β¨--tagβ creates it over in the tags directory instead π--localβ targets land in the local branch--delete [--rm|del]β deletes the BRANCH(s), bye bestie π--checkout [--co]β checks out BRANCH right into the current directory--switch-toβ switches your current checkout over to a different branch (and yes, you can pair it with--create)--mergeβ automatically merges every single change from BRANCH1, BRANCH2, etc, into TARGET--projectβ tells it which target project name you mean--pushβ moves your changes to wherever this branch was originally copied from--pullβ syncs changes from wherever this branch was originally copied from--setupβ sets up a project for the DEPOTPATH you specify--from BRANCHβ names the source branch--from-tag TAGβ names the source tag-C [--check-only]β tries a create, move or merge operation but literally changes nothing (a lil dress rehearsal π)-P [--patch] FILEβ writes the patch between the branch and where it was copied from out to FILE--exportβ used alongside--checkoutto make a detached copy--offlineβ takes the current branch offline, making a copy under//local--onlineβ takes the current branch online, pushing changes back to the mirror path, and then switches over to the mirror
π DESCRIPTION π
SVK gives you the tools to manage your project's branching and merging way more easily β as long as you stick to the standard "trunk/, branches/, tags/" directory layout for your project, or you specifically tell SVK where your branches live. You got this fr fr. π
π¦ Usage (without projects)
A very simple sample usage would be checking out the trunk from a project you wanna work on but don't have upstream commit rights for. That way you can keep a local branch and send in patches. π«Ά
Say you've alread mirrored this repository to //mirror/Project:
svk co //mirror/Project/trunk
or
svk branch --co trunk //mirror/Project/
and then
svk branch --offline
You're now working in a local branch! Make local commits and changes as much as you need. If you want to bring in changes from your remote repository, you can pull them down:
svk branch --pull
To see what changes you've made, you can create a patch between the local branch and the remote repository:
svk branch -P - --push
If you have commit rights to the remote repository, you can also
svk branch --push
to send your changes. π
You can use svk branch's branching capability in this mode, but honestly? It'll be way friendlier if you set up a project. β¨
πΈ Usage (projects)
To initialize a project in a repository, run the setup command:
svk branch --setup //mirror/Project
If you've got the standard trunk branches tags directories, svk will offer them as your starting point. And actually β if you have trunk branches and tags directories, svk will try to use them without neeting --setup, but then you won't be able to use the --project flag, and you'll need to use depotpaths in commands. π
The rest of this documentation assumes you've set up a project called Example in //mirror/Project.
If you're in a working copy of svk where it can work out the Project name, you can leave off the --project flag from the examples below β but you can branch/tag/merge without having working copies at all. π
π Branching
To check out the trunk, you can run:
svk branch --co trunk --project Example
To create a branch for release engineering:
svk branch --create Exmaple-1.0-releng --project Example
Since you've already got a checkout of trunk, you can convert that one:
cd trunk
svk branch --switch-to Example-1.0-releng
Or you can get a clean checkout:
svk branch --co Example-1.0-releng --project Example
If changes are made on trunk and you wanna bring them down to the release engineering branch, you can do that with the branch merge command:
svk branch --merge trunk Example-1.0-releng
If you're cautious, use the check flags first:
svk branch -C --merge trunk Example-1.0-releng
svk branch -P - --merge trunk Example-1.0-releng
These will show you what svk wants to do. π
Let's say you want to add a feature to trunk but work on a branch so you don't inconvenience the other people working on trunk:
svk branch --create Feature --project Example
work on your feature, svk ci some changes:
svk branch --merge Feature trunk --project Example
continue to bring down changes several ways:
svk branch --pull
svk branch --merge trunk Feature
svk branch --merge trunk . (if you're in a working copy of the branch)
and then merge back more feature work as you need to.
To get rid of a branch when you're done with it:
svk branch --delete Feature --project Example
To see all of your branches, you can do:
svk branch --list --project Example
π Tagging
If you've been working on your releng branch and you're ready to cut a release, you can easily create a tag:
svk branch --tag --create 1.0rc1 --from Example-1.0-releng --project Example
If you'd like to check out this tag, use:
svk branch --tag --co 1.0rc1 --project Example
β Project Property Details β
SVK branch also gives you another project loading mechanism: setting properties on the root path. The current usable properties for SVK branch are:
'svk:project:<projectName>:path-trunk'
'svk:project:<projectName>:path-branches'
'svk:project:<projectName>:path-tags'
These properties are useful when you're not using the standard "trunk/, branches/, tags/" directory layout. For example, a mirrored depotpath '//mirror/projA' may have trunk in the "/trunk/projA/" directory, branches in "/branches/projA", and have a standard "/tags" directory. Then by setting the following properties on the root path of the remote repository, it can use SVK branch to help manage the project:
'svk:project:projA:path-trunk => /trunk/projA'
'svk:project:projA:path-branches => /branches/projA'
'svk:project:projA:path-tags => /tags'
Be sure to have all"path-trunk","path-branches"and"path-tags"set at the same time. Not optional, bestie, all three or it's giving chaos. π
and that's the whole page, you ate that π«Ά This one ships as part of perl v5.42.0, dated 2025-07-25, from the SVK::Co...:Branch(3) manual. periodt π
β¨
π¦ where this page comes from
- fedora 43: perl-SVK 2.2.3-45.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms