1SVK::Command::Branch(3)User Contributed Perl DocumentatioSnVK::Command::Branch(3)
2
3
4

NAME

6       SVK::Command::Branch - Manage a project with its branches
7

SYNOPSIS

9        branch --create BRANCH [DEPOTPATH]
10
11        branch --list [--all]
12        branch --create BRANCH [--tag] [--local] [--switch-to] [--from|--from-tag BRANCH|TAG] [DEPOTPATH]
13        branch --move BRANCH1 BRANCH2
14        branch --merge BRANCH1 BRANCH2 ... TARGET
15        branch --checkout BRANCH [PATH] [DEPOTPATH]
16        branch --delete BRANCH1 BRANCH2 ...
17        branch --setup DEPOTPATH
18        branch --push [BRANCH]
19        branch --pull [BRANCH]
20        branch --offline [BRANCH]
21        branch --online [BRANCH]
22

OPTIONS

24        -l [--list]        : list branches for this project
25        --list-projects    : list avaliable projects
26        --create           : create a new branch
27        --tag              : create in the tags directory
28        --local            : targets in local branch
29        --delete [--rm|del]: delete BRANCH(s)
30        --checkout [--co]  : checkout BRANCH in current directory
31        --switch-to        : switch the current checkout to another branch
32                                 (can be paired with --create)
33        --merge            : automatically merge all changes from BRANCH1, BRANCH2,
34                                 etc, to TARGET
35        --project          : specify the target project name
36        --push             : move changes to wherever this branch was copied from
37        --pull             : sync changes from wherever this branch was copied from
38        --setup            : setup a project for a specified DEPOTPATH
39        --from BRANCH      : specify the source branch name
40        --from-tag TAG     : specify the source tag name
41        -C [--check-only]  : try a create, move or merge operation but make no
42                             changes
43        -P [--patch] FILE  : Write the patch between the branch and where it was
44                             copied from to FILE
45        --export           : used with --checkout to create a detached copy
46        --offline          : takes the current branch offline, making a copy
47                             under //local
48        --online           : takes the current branch online, pushing changes back
49                             to the mirror path, and then switches to the mirror
50

DESCRIPTION

52       SVK provides tools to more easily manage your project's branching and
53       merging, so long as you use the standard "trunk/, branches/, tags/"
54       directory layout for your project or specifically tell SVK where your
55       branches live.
56

Usage (without projects)

58       A very simple sample usage might be to checkout the trunk from a
59       project you want to work on but don't have upstream commit rights for.
60       This allows you to maintain a local branch and to send in patches.
61
62       Assuming you have alread mirrored this repository to //mirror/Project
63
64           svk co //mirror/Project/trunk
65       or
66           svk branch --co trunk //mirror/Project/
67
68       and then
69
70           svk branch --offline
71
72       You're now working in a local branch, make local commits and changes as
73       you need to.  If you want to bring in changes from your remote
74       repository, you can pull them down
75
76           svk branch --pull
77
78       To see what changes you've made, you can create a patch between the
79       local branch and the remote repository
80
81           svk branch -P - --push
82
83       If you have commit rights to the remote repository, you can also
84
85           svk branch --push
86
87       to send your changes.
88
89       You can use svk branch's branching capability in this mode, but it will
90       be much friendlier if you set up a project
91

Usage (projects)

93       To initialize a project in a repository, run the setup command
94
95           svk branch --setup //mirror/Project
96
97       If you have the standard trunk branches tags directories svk will offer
98       them as the starting point.  In fact, if you have trunk branches and
99       tags directories, svk will try to use them without neeting --setup, but
100       you won't be able to use the --project flag and will need to use
101       depotpaths in commands.
102
103       The rest of this documentation assumes you've set up a project called
104       Example in //mirror/Project
105
106       If you're in a working copy of svk where it can work out the Project
107       name, you can leave off the --project flag from the examples below, but
108       you can branch/tag/merge without having working copies
109
110   Branching
111       To check out the trunk, you can run
112
113           svk branch --co trunk --project Example
114
115       To create a branch for release engineering
116
117           svk branch --create Exmaple-1.0-releng --project Example
118
119       Since you have a checkout of trunk already, you can convert that
120
121           cd trunk
122           svk branch --switch-to Example-1.0-releng
123
124       Or you can get a clean checkout
125
126           svk branch --co Example-1.0-releng --project Example
127
128       If changes are made on trunk and you wish to bring them down to the
129       release engineering branch, you can do that with the branch merge
130       command
131
132           svk branch --merge trunk Example-1.0-releng
133
134       If you're cautious, use the check flags first:
135
136           svk branch -C --merge trunk Example-1.0-releng
137           svk branch -P -  --merge trunk Example-1.0-releng
138
139       These will show you what svk wants to do.
140
141       Lets say you want to add a feature to trunk but work on a branch so you
142       don't inconvenience others who are working on trunk:
143
144           svk branch --create Feature --project Example
145
146       work on your feature, svk ci some changes
147
148           svk branch --merge Feature trunk --project Example
149
150       continue to bring down changes several ways
151
152           svk branch --pull
153           svk branch --merge trunk Feature
154           svk branch --merge trunk .   (if you're in a working copy of the branch)
155
156       and then merge back more feature work as you need to
157
158       To get rid of a branch when you're done with it
159
160           svk branch --delete Feature --project Example
161
162       To see all of your branches, you can do:
163
164           svk branch --list --project Example
165
166   Tagging
167       If you've been working on your releng branch and are ready to cut a
168       release, you can easily create a tag
169
170           svk branch --tag --create 1.0rc1 --from Example-1.0-releng --project Example
171
172       If you would like to check out this tag, use
173
174           svk branch --tag --co 1.0rc1 --project Example
175

Project Property Details

177       SVK branch also provides another project loading mechanism by setting
178       properties on root path. Current usable properties for SVK branch are
179
180         'svk:project:<projectName>:path-trunk'
181         'svk:project:<projectName>:path-branches'
182         'svk:project:<projectName>:path-tags'
183
184       These properties are useful when you are not using the standard
185       "trunk/, branches/, tags/" directory layout. For example, a mirrored
186       depotpath '//mirror/projA' may have trunk in "/trunk/projA/" directory,
187       branches in "/branches/projA", and have a standard "/tags" directory.
188       Then by setting the following properties on root path of remote
189       repository, it can use SVK branch to help manage the project:
190
191         'svk:project:projA:path-trunk => /trunk/projA'
192         'svk:project:projA:path-branches => /branches/projA'
193         'svk:project:projA:path-tags => /tags'
194
195       Be sure to have all "path-trunk", "path-branches" and "path-tags" set
196       at the same time.
197
198
199
200perl v5.32.0                      2020-07-28           SVK::Command::Branch(3)
Impressum