svnauto 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/sc +2 -10
- data/{lib/sc/constants.rb → bin/sva} +8 -13
- data/lib/{sc.rb → svnauto.rb} +13 -9
- data/lib/{sc → svnauto}/command.rb +8 -3
- data/lib/{sc → svnauto}/commands/bug.rb +5 -2
- data/lib/{sc → svnauto}/commands/checkout.rb +3 -1
- data/lib/{sc → svnauto}/commands/config.rb +18 -2
- data/lib/{sc → svnauto}/commands/create.rb +2 -1
- data/lib/{sc → svnauto}/commands/experimental.rb +19 -5
- data/lib/svnauto/commands/externals.rb +128 -0
- data/lib/{sc → svnauto}/commands/info.rb +1 -1
- data/lib/{sc → svnauto}/commands/list.rb +3 -1
- data/lib/{sc → svnauto}/commands/release.rb +39 -7
- data/lib/{sc → svnauto}/config_file.rb +3 -3
- data/lib/{sc/path.rb → svnauto/constants.rb} +24 -18
- data/lib/{sc → svnauto}/dispatcher.rb +11 -4
- data/lib/svnauto/path.rb +138 -0
- data/lib/{sc → svnauto}/project.rb +16 -11
- data/lib/{sc → svnauto}/repository.rb +2 -2
- data/lib/{sc → svnauto}/svn.rb +51 -10
- data/lib/svnauto/svn_externals.rb +187 -0
- data/lib/svnauto/svn_info.rb +96 -0
- data/lib/{sc → svnauto}/version.rb +2 -2
- data/test/setup.rb +24 -28
- data/test/test_bug.rb +10 -10
- data/test/test_checkout.rb +3 -3
- data/test/test_create.rb +3 -3
- data/test/test_experimental.rb +33 -18
- data/test/test_externals.rb +55 -0
- data/test/test_path.rb +148 -0
- data/test/test_release.rb +11 -11
- data/test/test_svninfo.rb +17 -0
- data/test/test_version.rb +16 -16
- metadata +35 -42
- data/INSTALL +0 -48
- data/LICENSE +0 -22
- data/README +0 -81
- data/THANKS +0 -8
- data/TODO +0 -8
- data/doc/manual.txt +0 -241
data/README
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
= What is SC?
|
2
|
-
|
3
|
-
SC is a wrapper around Subversion that automates and standardizes branching
|
4
|
-
and merging. The primary goal of the project is to simplify the more complex
|
5
|
-
features of Subversion and therefore encouraging their use.
|
6
|
-
|
7
|
-
|
8
|
-
== Quick Start
|
9
|
-
|
10
|
-
This is a very terse introduction to using SC. For more information, please
|
11
|
-
read the INSTALL file, and it is highly recommended that you read the
|
12
|
-
doc/manual.txt file.
|
13
|
-
|
14
|
-
|
15
|
-
=== Install SC Dependencies
|
16
|
-
|
17
|
-
* Subversion (svn and svnadmin) (http://subversion.tigris.org/)
|
18
|
-
* Ruby (http://www.ruby-lang.org/en/downloads/)
|
19
|
-
* RubyGems (http://docs.rubygems.org/)
|
20
|
-
|
21
|
-
|
22
|
-
=== Downloading and Installing SC
|
23
|
-
|
24
|
-
SC is distributed as a RubyGem. You can install SC using the gem command:
|
25
|
-
|
26
|
-
> gem install svnauto --include-dependencies
|
27
|
-
|
28
|
-
Other download options can be found at: http://rubyforge.org/projects/svnauto/
|
29
|
-
|
30
|
-
=== Getting SC from Its Subversion Repository
|
31
|
-
|
32
|
-
> svn co http://pmade.com/svn/oss/sc/trunk sc-trunk
|
33
|
-
|
34
|
-
|
35
|
-
=== Configure Your Repositories
|
36
|
-
|
37
|
-
Start by telling SC about the repositories you use:
|
38
|
-
|
39
|
-
> sc config --add
|
40
|
-
|
41
|
-
You can also use this method to create a new local repository. When prompted
|
42
|
-
for a repository URL, give a path to a nonexistent directory.
|
43
|
-
|
44
|
-
|
45
|
-
=== Creating a Project with SC
|
46
|
-
|
47
|
-
SC considers top-level directories in the repository to be projects. You can
|
48
|
-
create a new project using the SC 'create' command. This command is
|
49
|
-
non-destructive, so you can use it to make sure that an existing project has
|
50
|
-
the correct directory layout. For more information, see doc/manual.txt.
|
51
|
-
|
52
|
-
> sc create my-new-project
|
53
|
-
|
54
|
-
|
55
|
-
=== Making a Release of Your Project
|
56
|
-
|
57
|
-
When it's time to make an official public release of your software, you should
|
58
|
-
create a release branch and tag the release:
|
59
|
-
|
60
|
-
> sc release 1.0.0
|
61
|
-
|
62
|
-
SC uses a strict version number scheme. Version numbers are formated as
|
63
|
-
MAJOR.MINOR.MACRO. Each component of the version number can be up to six
|
64
|
-
digits long, but they are restricted to integers.
|
65
|
-
|
66
|
-
MAJOR.MINOR version releases are kept on their own release branch. MACRO
|
67
|
-
releases are tags on a release branch. For more information, see
|
68
|
-
doc/manual.txt.
|
69
|
-
|
70
|
-
|
71
|
-
=== Fixing Bugs on a Release Branch
|
72
|
-
|
73
|
-
This is an example that illustrates the use of bug fix branches. Here we take
|
74
|
-
the necessary steps to fix a bug on the release branch. The SC 'bug' command
|
75
|
-
takes a unique bug identifier, which usually comes from a bug tracking system:
|
76
|
-
|
77
|
-
> sc bug 25
|
78
|
-
> # edit files, fix bug, test, and commit
|
79
|
-
> sc bug --close 25
|
80
|
-
|
81
|
-
The bug fix is then merged with the release branch and the trunk.
|
data/THANKS
DELETED
data/TODO
DELETED
data/doc/manual.txt
DELETED
@@ -1,241 +0,0 @@
|
|
1
|
-
= SC Users Manual
|
2
|
-
|
3
|
-
== SC Command Usage
|
4
|
-
|
5
|
-
SC is invoked in a manner similar to the Subversion svn command. When you use
|
6
|
-
the sc command, you supply optional command line flags, a command, and
|
7
|
-
possibly more command line flags.
|
8
|
-
|
9
|
-
=== SC Invocation Example
|
10
|
-
|
11
|
-
> sc -r test create hello
|
12
|
-
|
13
|
-
This runs the sc command, telling it to use the test repository and to create
|
14
|
-
a project with the name hello. Here is a more complex example:
|
15
|
-
|
16
|
-
> sc -r test create -f hello
|
17
|
-
|
18
|
-
=== Getting More Help
|
19
|
-
|
20
|
-
For a list of top-level command line flags, and commands, invoke sc with
|
21
|
-
the --help command line flag.
|
22
|
-
|
23
|
-
=== Commands
|
24
|
-
|
25
|
-
All work in SC is done through a command. For information about a specific
|
26
|
-
command, give the --help option to the command, for example:
|
27
|
-
|
28
|
-
> sc create --help
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
== Telling SC About Your Repositories
|
33
|
-
|
34
|
-
To save you from having to enter the full URL for the repository each time you
|
35
|
-
use SC, you can store repository URLs in the SC configuration file, which is
|
36
|
-
~/.sc by default.
|
37
|
-
|
38
|
-
=== Adding a Repository
|
39
|
-
|
40
|
-
Use the SC config command to add a repository to the SC configuration file,
|
41
|
-
for example:
|
42
|
-
|
43
|
-
> sc config --add
|
44
|
-
|
45
|
-
Will tell SC to prompt you to enter information about a repository. You will
|
46
|
-
be asked for a name for the repository. The name is then used instead of the
|
47
|
-
URL when invoking SC.
|
48
|
-
|
49
|
-
=== Auto-Discovery
|
50
|
-
|
51
|
-
If you invoke SC from a Subversion controlled directory, SC will automatically
|
52
|
-
use the current repository URL and project name, unless you give SC the -r and
|
53
|
-
-p flags.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
== Creating a New Project
|
58
|
-
|
59
|
-
You can use SC to create a new project directory structure in the repository.
|
60
|
-
To do this, use the SC create command:
|
61
|
-
|
62
|
-
> sc create my-project-name
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
== Checking Out a Project
|
67
|
-
|
68
|
-
The SC checkout command can be used to help you do a Subversion checkout:
|
69
|
-
|
70
|
-
> sc checkout my-project-name
|
71
|
-
|
72
|
-
By default, the trunk is checked out. Using command line flags, you can also
|
73
|
-
choose to checkout a release, an experimental branch, or a bug fix branch.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
== Making a Release Branch
|
78
|
-
|
79
|
-
You normally work with your project on its trunk. When it comes time to make
|
80
|
-
a release of your software, you stabilize the trunk, and then make a release
|
81
|
-
branch. The release branch allows you to later fix bugs for a release without
|
82
|
-
having to release the new and unstable features that now exist in the trunk.
|
83
|
-
|
84
|
-
=== Version Numbers
|
85
|
-
|
86
|
-
Before we talk about release branches, we must first talk about version
|
87
|
-
numbers and what SC understands. SC puts strict limitations on version
|
88
|
-
numbers in order to reliably parse and sort version numbers.
|
89
|
-
|
90
|
-
A version number is made up of three parts, MAJOR, MINOR, and MACRO. For
|
91
|
-
example, the version number 10.4.8 has a MAJOR version of 10, a MINOR version
|
92
|
-
of 4 and a MACRO version of 8.
|
93
|
-
|
94
|
-
Each part of the version number must be an integer, and must not be greater
|
95
|
-
than 6 digits.
|
96
|
-
|
97
|
-
SC can properly sort version numbers. For example, version 1.0.10 comes
|
98
|
-
after version number 1.0.2. So, SC actually sorts the version numbers knowing
|
99
|
-
what they mean, instead of just doing a lexical sort.
|
100
|
-
|
101
|
-
Because of this, when using SC, you must use this version numbering scheme.
|
102
|
-
|
103
|
-
=== Branching the Trunk for a Release
|
104
|
-
|
105
|
-
To make a release branch from the current point of the trunk, use the SC
|
106
|
-
release command:
|
107
|
-
|
108
|
-
> sc release 1.0.0
|
109
|
-
|
110
|
-
This will create a release branch for MAJOR.MINOR version 1.0, and then tag
|
111
|
-
the release branch with MACRO version 0.
|
112
|
-
|
113
|
-
|
114
|
-
== Fixing a Bug for a Release
|
115
|
-
|
116
|
-
The great thing about release branches is that you can fix a bug in an older
|
117
|
-
release, without having to create a new release from the trunk of your
|
118
|
-
project. This is because the trunk may contain new features that may not be
|
119
|
-
backwards compatible, or the trunk may currently be unstable.
|
120
|
-
|
121
|
-
To fix a bug that exists in a specific release, you would have to manually do
|
122
|
-
the following:
|
123
|
-
|
124
|
-
1. Branch from the release branch creating a bug fix branch
|
125
|
-
2. Fix the bug on the bug fix branch
|
126
|
-
3. Test and commit your fix
|
127
|
-
4. Merge the bug fix branch to the release branch
|
128
|
-
5. Merge the bug fix branch to the trunk
|
129
|
-
6. Make a new release
|
130
|
-
|
131
|
-
Step five is very important. It ensures that the bug fix makes its way to the
|
132
|
-
trunk, and therefore the next release.
|
133
|
-
|
134
|
-
SC automates this process. It relies on the fact that you assign unique bug
|
135
|
-
identifiers to each bug using a bug tracking system. The example below helps
|
136
|
-
fix a bug with the ID of 5 on the latest release branch:
|
137
|
-
|
138
|
-
> sc bug 5
|
139
|
-
> # fix and commit
|
140
|
-
> sc bug --close 5
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
== Working With Experimental Branches
|
145
|
-
|
146
|
-
Sometimes you might want to make a large set of changes to the trunk that will
|
147
|
-
greatly affect the stability of the code, or might take longer than normal to
|
148
|
-
implement. It's even possible that you might want to make changes to the
|
149
|
-
project that may never be released.
|
150
|
-
|
151
|
-
SC allows you to create experimental branches for such purposes. Experimental
|
152
|
-
branches can be created off the trunk, and can receive changes from the trunk
|
153
|
-
or send changes to the trunk.
|
154
|
-
|
155
|
-
=== Creating an Experimental Branch
|
156
|
-
|
157
|
-
To create an experimental branch, use the SC experimental command, of course,
|
158
|
-
that's a bit much to type, so SC allows you to abbreviate it:
|
159
|
-
|
160
|
-
> sc exp testing-new-parser
|
161
|
-
|
162
|
-
This creates a new experimental branch called testing-new-parser.
|
163
|
-
|
164
|
-
=== Merging the Current Trunk to the Experimental Branch
|
165
|
-
|
166
|
-
Use the SC experimental command with the --up flag:
|
167
|
-
|
168
|
-
> sc exp --up testing-new-parser
|
169
|
-
|
170
|
-
=== Merging the Experimental Branch to the Trunk
|
171
|
-
|
172
|
-
Use the SC experimental command with the --down flag:
|
173
|
-
|
174
|
-
> sc exp --down testing-new-parser
|
175
|
-
|
176
|
-
== Theory
|
177
|
-
|
178
|
-
This section aims to help the SC user understand the implementation decisions
|
179
|
-
that were made.
|
180
|
-
|
181
|
-
=== Inspiration
|
182
|
-
|
183
|
-
The layout of the repository was mostly inspired by:
|
184
|
-
|
185
|
-
Pragmatic Version Control, Using Subversion
|
186
|
-
By Mike Mason
|
187
|
-
ISBN 0-9745140-6-3
|
188
|
-
|
189
|
-
The process for creating release branches and tags is based on the one used by
|
190
|
-
the FreeBSD Release Engineering Team: http://www.freebsd.org/releng/
|
191
|
-
|
192
|
-
=== Repository Layout
|
193
|
-
|
194
|
-
The directories at the top-level of the repository are considered to be
|
195
|
-
projects. In each project, a very specific directory structure is maintained.
|
196
|
-
|
197
|
-
==== The Trunk Directory
|
198
|
-
|
199
|
-
The trunk directory is used to store the most current version of the project.
|
200
|
-
There is no enforcement of the structure inside the trunk. Developers usually
|
201
|
-
work on the trunk until a point in time where the source code in the trunk
|
202
|
-
becomes stable. At this time, a branch of the trunk is made.
|
203
|
-
|
204
|
-
==== The Branches Directory
|
205
|
-
|
206
|
-
The branches directory is used to store branches made of the project. This
|
207
|
-
includes release branches, bug fix branches, and experimental branches.
|
208
|
-
|
209
|
-
==== The Tags Directory
|
210
|
-
|
211
|
-
The tags directory is used to record a point in time for the project. This
|
212
|
-
includes the time at which releases where made, or bug fix branches were
|
213
|
-
created.
|
214
|
-
|
215
|
-
==== Branches and Tags Subdirectories
|
216
|
-
|
217
|
-
The branches and tags directories both include the following subdirectories:
|
218
|
-
|
219
|
-
rel: For releases
|
220
|
-
bug: For bug fixes
|
221
|
-
exp: For experimental code
|
222
|
-
|
223
|
-
==== Repository Structure Visualization
|
224
|
-
|
225
|
-
myproject:
|
226
|
-
|
|
227
|
-
+--trunk
|
228
|
-
| |
|
229
|
-
| +--project-files
|
230
|
-
|
|
231
|
-
+--branches
|
232
|
-
| |
|
233
|
-
| +--rel
|
234
|
-
| +--bug
|
235
|
-
| +--exp
|
236
|
-
|
|
237
|
-
+--tags
|
238
|
-
|
|
239
|
-
+--rel
|
240
|
-
+--bug
|
241
|
-
+--exp
|