Difference between revisions of "Svnman"
Line 200: | Line 200: | ||
/^[A-Z][A-Z0-9_]{0,14}[a-z0-9]$/ | /^[A-Z][A-Z0-9_]{0,14}[a-z0-9]$/ | ||
+ | |||
+ | === [[#ALIAS|ALIAS]] === | ||
+ | |||
+ | Alias format: | ||
+ | |||
+ | /^[a-z][a-z0-9-]{0,14}[a-z0-9]$/ | ||
== Subcommands == | == Subcommands == | ||
Line 209: | Line 215: | ||
Configure an svnman repository alias. | Configure an svnman repository alias. | ||
− | A repository alias associates | + | A repository alias associates an alias with a repo location, allowing the |
− | repo | + | repo alias to be used as a shortcut for the repo location in commands which |
accept a --repo argument. A default working base [[#DIR|DIR]] and a ViewVC [[#URL|URL]] can | accept a --repo argument. A default working base [[#DIR|DIR]] and a ViewVC [[#URL|URL]] can | ||
− | also be associated with a repo | + | also be associated with a repo alias. |
Note that the config file is in [[#JSON|JSON]] format in: | Note that the config file is in [[#JSON|JSON]] format in: | ||
Line 219: | Line 225: | ||
Required arguments: | Required arguments: | ||
− | -- | + | --alias [[#ALIAS|ALIAS]] : name of a repository alias |
--location [[#URL|URL]] : location of the repository | --location [[#URL|URL]] : location of the repository | ||
Line 455: | Line 461: | ||
| invalid const. | | invalid const. | ||
|- | |- | ||
− | |<html><span id='ERR_INVALID_VERSION_PATCH'></span></html> | + | |<html><span id='ERR_INVALID_ALIAS'></span></html> 27 |
+ | | [[#ERR_INVALID_ALIAS|ERR_INVALID_ALIAS]] | ||
+ | | invalid alias. | ||
+ | |- | ||
+ | |<html><span id='ERR_INVALID_VERSION_PATCH'></span></html> 28 | ||
| [[#ERR_INVALID_VERSION_PATCH|ERR_INVALID_VERSION_PATCH]] | | [[#ERR_INVALID_VERSION_PATCH|ERR_INVALID_VERSION_PATCH]] | ||
| invalid version [[#PATCH|PATCH]]. | | invalid version [[#PATCH|PATCH]]. | ||
|- | |- | ||
− | |<html><span id='ERR_INVALID_CONFIG'></span></html> | + | |<html><span id='ERR_INVALID_CONFIG'></span></html> 29 |
| [[#ERR_INVALID_CONFIG|ERR_INVALID_CONFIG]] | | [[#ERR_INVALID_CONFIG|ERR_INVALID_CONFIG]] | ||
| invalid config. | | invalid config. | ||
|- | |- | ||
− | |<html><span id='ERR_INVALID_SVN_INFO'></span></html> | + | |<html><span id='ERR_INVALID_SVN_INFO'></span></html> 30 |
| [[#ERR_INVALID_SVN_INFO|ERR_INVALID_SVN_INFO]] | | [[#ERR_INVALID_SVN_INFO|ERR_INVALID_SVN_INFO]] | ||
| invalid svn info. | | invalid svn info. | ||
|- | |- | ||
− | |<html><span id='ERR_MISSING_VERSION_FILE'></span></html> | + | |<html><span id='ERR_MISSING_VERSION_FILE'></span></html> 31 |
| [[#ERR_MISSING_VERSION_FILE|ERR_MISSING_VERSION_FILE]] | | [[#ERR_MISSING_VERSION_FILE|ERR_MISSING_VERSION_FILE]] | ||
| missing version file. | | missing version file. | ||
|- | |- | ||
− | |<html><span id='ERR_MISSING_VERSION_PART'></span></html> | + | |<html><span id='ERR_MISSING_VERSION_PART'></span></html> 32 |
| [[#ERR_MISSING_VERSION_PART|ERR_MISSING_VERSION_PART]] | | [[#ERR_MISSING_VERSION_PART|ERR_MISSING_VERSION_PART]] | ||
| missing version part. | | missing version part. | ||
|- | |- | ||
− | |<html><span id='ERR_MISSING_PROJECT_NAME'></span></html> | + | |<html><span id='ERR_MISSING_PROJECT_NAME'></span></html> 33 |
| [[#ERR_MISSING_PROJECT_NAME|ERR_MISSING_PROJECT_NAME]] | | [[#ERR_MISSING_PROJECT_NAME|ERR_MISSING_PROJECT_NAME]] | ||
| missing project name. | | missing project name. | ||
|- | |- | ||
− | |<html><span id='ERR_MAJOR_VERSION_CONFLICT'></span></html> | + | |<html><span id='ERR_MAJOR_VERSION_CONFLICT'></span></html> 34 |
| [[#ERR_MAJOR_VERSION_CONFLICT|ERR_MAJOR_VERSION_CONFLICT]] | | [[#ERR_MAJOR_VERSION_CONFLICT|ERR_MAJOR_VERSION_CONFLICT]] | ||
| [[#MAJOR|MAJOR]] version conflict. | | [[#MAJOR|MAJOR]] version conflict. | ||
|- | |- | ||
− | |<html><span id='ERR_MINOR_VERSION_CONFLICT'></span></html> | + | |<html><span id='ERR_MINOR_VERSION_CONFLICT'></span></html> 35 |
| [[#ERR_MINOR_VERSION_CONFLICT|ERR_MINOR_VERSION_CONFLICT]] | | [[#ERR_MINOR_VERSION_CONFLICT|ERR_MINOR_VERSION_CONFLICT]] | ||
| [[#MINOR|MINOR]] version conflict. | | [[#MINOR|MINOR]] version conflict. | ||
|- | |- | ||
− | |<html><span id='ERR_PATCH_VERSION_EVEN'></span></html> | + | |<html><span id='ERR_PATCH_VERSION_EVEN'></span></html> 36 |
| [[#ERR_PATCH_VERSION_EVEN|ERR_PATCH_VERSION_EVEN]] | | [[#ERR_PATCH_VERSION_EVEN|ERR_PATCH_VERSION_EVEN]] | ||
| [[#PATCH|PATCH]] version is even (release). | | [[#PATCH|PATCH]] version is even (release). | ||
|- | |- | ||
− | |<html><span id='ERR_PATCH_VERSION_ODD'></span></html> | + | |<html><span id='ERR_PATCH_VERSION_ODD'></span></html> 37 |
| [[#ERR_PATCH_VERSION_ODD|ERR_PATCH_VERSION_ODD]] | | [[#ERR_PATCH_VERSION_ODD|ERR_PATCH_VERSION_ODD]] | ||
| [[#PATCH|PATCH]] version is odd (dev). | | [[#PATCH|PATCH]] version is odd (dev). | ||
|- | |- | ||
− | |<html><span id='ERR_EXPECTED_BRANCHES'></span></html> | + | |<html><span id='ERR_EXPECTED_BRANCHES'></span></html> 38 |
| [[#ERR_EXPECTED_BRANCHES|ERR_EXPECTED_BRANCHES]] | | [[#ERR_EXPECTED_BRANCHES|ERR_EXPECTED_BRANCHES]] | ||
| expceded "branches". | | expceded "branches". | ||
|- | |- | ||
− | |<html><span id='ERR_CHDIR_FAILED'></span></html> | + | |<html><span id='ERR_CHDIR_FAILED'></span></html> 39 |
| [[#ERR_CHDIR_FAILED|ERR_CHDIR_FAILED]] | | [[#ERR_CHDIR_FAILED|ERR_CHDIR_FAILED]] | ||
| chdir failed. | | chdir failed. | ||
|- | |- | ||
− | |<html><span id='ERR_NO_EXTERNALS'></span></html> | + | |<html><span id='ERR_NO_EXTERNALS'></span></html> 40 |
| [[#ERR_NO_EXTERNALS|ERR_NO_EXTERNALS]] | | [[#ERR_NO_EXTERNALS|ERR_NO_EXTERNALS]] | ||
| no externals. | | no externals. | ||
|- | |- | ||
− | |<html><span id='ERR_NO_HOME_ENV_VAR'></span></html> | + | |<html><span id='ERR_NO_HOME_ENV_VAR'></span></html> 41 |
| [[#ERR_NO_HOME_ENV_VAR|ERR_NO_HOME_ENV_VAR]] | | [[#ERR_NO_HOME_ENV_VAR|ERR_NO_HOME_ENV_VAR]] | ||
| no $[[#HOME|HOME]] environment variable. | | no $[[#HOME|HOME]] environment variable. | ||
|- | |- | ||
− | |<html><span id='ERR_NO_EXECUTABLE_SVN'></span></html> | + | |<html><span id='ERR_NO_EXECUTABLE_SVN'></span></html> 42 |
| [[#ERR_NO_EXECUTABLE_SVN|ERR_NO_EXECUTABLE_SVN]] | | [[#ERR_NO_EXECUTABLE_SVN|ERR_NO_EXECUTABLE_SVN]] | ||
| no executable `svn` command. | | no executable `svn` command. | ||
|- | |- | ||
− | |<html><span id='ERR_MISSING_HOME_DIR'></span></html> | + | |<html><span id='ERR_MISSING_HOME_DIR'></span></html> 43 |
| [[#ERR_MISSING_HOME_DIR|ERR_MISSING_HOME_DIR]] | | [[#ERR_MISSING_HOME_DIR|ERR_MISSING_HOME_DIR]] | ||
| missing $[[#HOME|HOME]] directory. | | missing $[[#HOME|HOME]] directory. | ||
|- | |- | ||
− | |<html><span id='ERR_CANNOT_MKDIR'></span></html> | + | |<html><span id='ERR_CANNOT_MKDIR'></span></html> 44 |
| [[#ERR_CANNOT_MKDIR|ERR_CANNOT_MKDIR]] | | [[#ERR_CANNOT_MKDIR|ERR_CANNOT_MKDIR]] | ||
| cannot mkdir. | | cannot mkdir. | ||
|- | |- | ||
− | |<html><span id='ERR_CANNOT_ACCESS_REPO'></span></html> | + | |<html><span id='ERR_CANNOT_ACCESS_REPO'></span></html> 45 |
| [[#ERR_CANNOT_ACCESS_REPO|ERR_CANNOT_ACCESS_REPO]] | | [[#ERR_CANNOT_ACCESS_REPO|ERR_CANNOT_ACCESS_REPO]] | ||
| cannot access repo. | | cannot access repo. | ||
|- | |- | ||
− | |<html><span id='ERR_CANNOT_MAKE_TEMP_DIR'></span></html> | + | |<html><span id='ERR_CANNOT_MAKE_TEMP_DIR'></span></html> 46 |
| [[#ERR_CANNOT_MAKE_TEMP_DIR|ERR_CANNOT_MAKE_TEMP_DIR]] | | [[#ERR_CANNOT_MAKE_TEMP_DIR|ERR_CANNOT_MAKE_TEMP_DIR]] | ||
| cannot make temp dir. | | cannot make temp dir. | ||
|- | |- | ||
− | |<html><span id='ERR_CANNOT_MATCH_VERSION_PATCH'></span></html> | + | |<html><span id='ERR_CANNOT_MATCH_VERSION_PATCH'></span></html> 47 |
| [[#ERR_CANNOT_MATCH_VERSION_PATCH|ERR_CANNOT_MATCH_VERSION_PATCH]] | | [[#ERR_CANNOT_MATCH_VERSION_PATCH|ERR_CANNOT_MATCH_VERSION_PATCH]] | ||
| cannot match version [[#PATCH|PATCH]]. | | cannot match version [[#PATCH|PATCH]]. | ||
|- | |- | ||
− | |<html><span id='ERR_SVN_COMMAND_FAILED'></span></html> | + | |<html><span id='ERR_SVN_COMMAND_FAILED'></span></html> 48 |
| [[#ERR_SVN_COMMAND_FAILED|ERR_SVN_COMMAND_FAILED]] | | [[#ERR_SVN_COMMAND_FAILED|ERR_SVN_COMMAND_FAILED]] | ||
| svn command failed. | | svn command failed. | ||
|- | |- | ||
− | |<html><span id='ERR_SVN_UNEXPECTED_OUTPUT'></span></html> | + | |<html><span id='ERR_SVN_UNEXPECTED_OUTPUT'></span></html> 49 |
| [[#ERR_SVN_UNEXPECTED_OUTPUT|ERR_SVN_UNEXPECTED_OUTPUT]] | | [[#ERR_SVN_UNEXPECTED_OUTPUT|ERR_SVN_UNEXPECTED_OUTPUT]] | ||
| unexpected svn output. | | unexpected svn output. | ||
|- | |- | ||
− | |<html><span id='ERR_NOT_WORKING_COPY'></span></html> | + | |<html><span id='ERR_NOT_WORKING_COPY'></span></html> 50 |
| [[#ERR_NOT_WORKING_COPY|ERR_NOT_WORKING_COPY]] | | [[#ERR_NOT_WORKING_COPY|ERR_NOT_WORKING_COPY]] | ||
| not an svn working copy. | | not an svn working copy. | ||
|- | |- | ||
− | |<html><span id='ERR_HAS_CHANGES'></span></html> | + | |<html><span id='ERR_HAS_CHANGES'></span></html> 51 |
| [[#ERR_HAS_CHANGES|ERR_HAS_CHANGES]] | | [[#ERR_HAS_CHANGES|ERR_HAS_CHANGES]] | ||
| found uncommitted changes. | | found uncommitted changes. | ||
|- | |- | ||
− | |<html><span id='ERR_FILE_WRITE'></span></html> | + | |<html><span id='ERR_FILE_WRITE'></span></html> 52 |
| [[#ERR_FILE_WRITE|ERR_FILE_WRITE]] | | [[#ERR_FILE_WRITE|ERR_FILE_WRITE]] | ||
| error writing file. | | error writing file. | ||
|- | |- | ||
− | |<html><span id='ERR_FILE_CLOSE'></span></html> | + | |<html><span id='ERR_FILE_CLOSE'></span></html> 53 |
| [[#ERR_FILE_CLOSE|ERR_FILE_CLOSE]] | | [[#ERR_FILE_CLOSE|ERR_FILE_CLOSE]] | ||
| error closing file. | | error closing file. | ||
|- | |- | ||
− | |<html><span id='ERR_FILE_UNLINK'></span></html> | + | |<html><span id='ERR_FILE_UNLINK'></span></html> 54 |
| [[#ERR_FILE_UNLINK|ERR_FILE_UNLINK]] | | [[#ERR_FILE_UNLINK|ERR_FILE_UNLINK]] | ||
| error unlinking file. | | error unlinking file. | ||
|- | |- | ||
− | |<html><span id='ERR_FILE_MISSING'></span></html> | + | |<html><span id='ERR_FILE_MISSING'></span></html> 55 |
| [[#ERR_FILE_MISSING|ERR_FILE_MISSING]] | | [[#ERR_FILE_MISSING|ERR_FILE_MISSING]] | ||
| file missing. | | file missing. | ||
|- | |- | ||
− | |<html><span id='ERR_CODE_GEN_FAILED'></span></html> | + | |<html><span id='ERR_CODE_GEN_FAILED'></span></html> 56 |
| [[#ERR_CODE_GEN_FAILED|ERR_CODE_GEN_FAILED]] | | [[#ERR_CODE_GEN_FAILED|ERR_CODE_GEN_FAILED]] | ||
| code generation failed. | | code generation failed. | ||
|- | |- | ||
− | |<html><span id='ERR_CONFIG_WRITE_FAILED'></span></html> | + | |<html><span id='ERR_CONFIG_WRITE_FAILED'></span></html> 57 |
| [[#ERR_CONFIG_WRITE_FAILED|ERR_CONFIG_WRITE_FAILED]] | | [[#ERR_CONFIG_WRITE_FAILED|ERR_CONFIG_WRITE_FAILED]] | ||
| error writing config file. | | error writing config file. | ||
|- | |- | ||
− | |<html><span id='ERR_UNSUPPORTED_FILE_TYPE'></span></html> | + | |<html><span id='ERR_UNSUPPORTED_FILE_TYPE'></span></html> 58 |
| [[#ERR_UNSUPPORTED_FILE_TYPE|ERR_UNSUPPORTED_FILE_TYPE]] | | [[#ERR_UNSUPPORTED_FILE_TYPE|ERR_UNSUPPORTED_FILE_TYPE]] | ||
| unsupported file type. | | unsupported file type. | ||
|- | |- | ||
− | |<html><span id='ERR_BRANCH_EXISTS'></span></html> | + | |<html><span id='ERR_BRANCH_EXISTS'></span></html> 59 |
| [[#ERR_BRANCH_EXISTS|ERR_BRANCH_EXISTS]] | | [[#ERR_BRANCH_EXISTS|ERR_BRANCH_EXISTS]] | ||
| branch already exists. | | branch already exists. |
Revision as of 04:47, 25 February 2020
Svnman (pronounced ess-vee-en-man) is the ProgClub Subversion project management software. That's the software that manages creation, maintenance, and release of Subversion projects. For other projects see projects.
Status
We use semantic versioning. Latest production version: 1.0. Latest development version: 1.0.
See tasks for work that still needs to be done.
Motivation
Why this software? Basically to help with project management, particularly around versioning of artefacts.
Administration
Contributors
Members who have contributed to this project. Newest on top.
All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.
Copyright
Copyright © 2020, Contributors.
License
Licensed under the MIT license.
Components
Libraries, tools, services or media from third parties used under license:
Resources
Downloads
There are presently no tarballs.
Source code
The source code can be browsed online:
The most interesting code is here:
The latest stable (read-only) released version of the code is available from Subversion from:
Or if you want the latest version for development purposes:
Note that our software development is done on the version branch, not on trunk. We use trunk to track the latest stable release.
Links
Specifications
Functional specification
The functional specification describes what the project does.
The software provides a system command with various subcommands for administering projects in a Subversion repository. For details see the command-line interface.
Versioning
The versioning article goes into more detail, but basically the version numbers supported by svnman are in the format MAJOR.MINOR.PATCH. Note that this versioning standard is used by both the svnman software itself and also any projects which use svnman as their project administration tool. This versioning standard is the only versioning standard supported by svnman at the present time. Note that there can be (and will be!) multiple MAJOR.MINOR releases whereas a specific MAJOR.MINOR.PATCH release is unique. This means that you can continue issuing patches (such as security updates) to particular MAJOR.MINOR versions. If you need a new MAJOR.MINOR version (say for your next prospective production release) then see the bump-minor command for help with that. If you're getting ready for a new MAJOR version see bump-major.
Part | Description | Details |
---|---|---|
MAJOR | major version number | incremented for breaking changes (except version zero (0) which may be unstable) |
MINOR | minor version number | incremented for non-breaking changes for new supported versions |
PATCH | patch version number | incremented prior to every commit (and release); the PATCH is odd for DEV builds and even for REL builds |
Builds
Two types of builds are supported by svnman: DEV and REL.
DEV
A 'DEV' (for "development") build is done by a programmer for testing and development purposes. You can use a DEV build if you want, but it might have known errors or be unsupported. You can tell DEV builds by their odd PATCH version number.
REL
A 'REL' (for "release") build is done by a project administrator (using svnman!) when it's time to do a production release. You can tell REL builds by their even PATCH version number.
Technical specification
The technical specification describes how the project works.
The software is written in PHP (tested on version 7.2) and shells out to the 'svn' command-line utility (tested on version 1.9.7).
Configuration data is kept in JSON format in $HOME/.config/svnman/config.json. Use the alias subcommand to specify configuration data via the command-line.
Command-line interface
general usage: svnman SUBCOMMAND [ARG...] [DIR...] A Subversion project management tool. Type `svnman help <subcommand>` for help on a specific subcommand. Type `svnman version` to see the program version. Type `svnman errors` to see information about possible program errors.
SUBCOMMAND
Available subcommands:
- config
- create
- maint
- freeze
- unfreeze (or thaw)
- release
- bump-minor
- bump-major
- browse
- gen-doc
- fix-version
Argument formats
ARG
An argument is a name prefixed with two dashes, optionally followed by whitespace and a value, depending on the argument. For example:
--no-trunk
Or:
--repo pcrepo
The special arguemnt '--' indicates that all subsequent command-line values are to be treaded as DIRs not as ARGs.
DIR
A PATH to a directory in the local file system. Absolute and relative paths are supported for input, but if directory paths are stored (such as with working base directories in repository aliases) the absolute paths are computed and stored at the time of configuration not at time of later use.
PATH
A location in the local file system. Absolute or relative paths are supported. A path can be to a standard file, directory, symlink, etc. Generally if a directory is required we explicitly document it as a DIR. If your PATH is to the wrong type of file per your SUBCOMMAND/ARG then you can expect to see an error as a result.
URL
A Uniform Resource Locator, typically with a scheme such as:
- http:
- https:
- file:
- svn:
NAME
Name format:
/^[a-z][a-z0-9\._-]{0,42}[a-z0-9]$/
CODE
Code format:
/^[a-z][a-z0-9-]{0,14}[a-z0-9]$/
CONST
Const format:
/^[A-Z][A-Z0-9_]{0,14}[a-z0-9]$/
ALIAS
Alias format:
/^[a-z][a-z0-9-]{0,14}[a-z0-9]$/
Subcommands
config
config: usage: svnman config ARG...
Configure an svnman repository alias.
A repository alias associates an alias with a repo location, allowing the repo alias to be used as a shortcut for the repo location in commands which accept a --repo argument. A default working base DIR and a ViewVC URL can also be associated with a repo alias.
Note that the config file is in JSON format in:
$HOME/.config/svnman/config.json
Required arguments:
--alias ALIAS : name of a repository alias --location URL : location of the repository
Optional arguments:
--working-base DIR : parent directory of the working copy --viewvc URL : ViewVC URL for the repository
For help on argument formats see `svnman help`.
create
create: usage: svnman create ARG...
Create a new project in a Subversion repository.
New projects are created with MAJOR version = 0, MINOR version = 1, and PATCH version = 1. The odd PATCH version indicates that the initial version is a DEV version.
Required arguments:
--project-name NAME : name of the project --repo NAME|URL : Subversion repository to operate on
Optional arguments:
--project-code CODE : project code (lowercase) --project-const CONST : project const (uppercase) --working-base DIR : parent directory of the working copy --working-copy DIR : directory containing the working copy --checkout : checkout into working copy [default] --no-checkout : don't checkout into working copy --phpbom : configure svn:externals on 'lib' DIR for PHPBOM library --no-phpbom : don't configure the PHPBOM library [default]
For help on argument formats see `svnman help`.
maint
maint: usage: svnman maint [DIR...]
Run maintenance on DIR.
Maintenance includes optional code generation and updating of the PATCH version. You should run this before your commits. You can only run maintenance on DEV builds and this is enforced by this subcommand. If your working copy is for a REL build (i.e. has an even PATCH version number) then you may need to run `svnman fix-version` to remedy the situation.
For help on argument formats see `svnman help`.
freeze
freeze: usage: svnman freeze [DIR...]
Freeze external subprojects in DIR.
Only available for projects that aren't in 'tags'. When fronzen externals are pinned to the revision which was current at the time of freezing.
For help on argument formats see `svnman help`.
unfreeze
unfreeze: usage: svnman unfreeze|thaw [DIR...]
Unfreeze external subprojects in DIR.
Only available for projects that aren't in 'tags'. When unfronzen externals are unpinned from a specific revision.
For help on argument formats see `svnman help`.
release
release: usage: svnman release [ARG...] [DIR...]
Release a project in DIR.
Prior to release projects are frozen, and after release they are unfrozen. When a release is done the starting version must be a DEV build (with an odd PATCH version number), then during the release the PATCH version number will be incremented to an even version number for the release, and after the release the PATCH version number will be incremented again to a new odd version number for use by the next DEV build.
Optional arguments:
--trunk : trunk is updated --no-trunk : trunk is not updated --auto-trunk : trunk updated if project is on latest branch [default]
For help on argument formats see `svnman help`.
bump-minor
bump-minor: usage: svnman bump-minor [DIR...]
Create a new version branch from DIR, incrementing the MINOR version number.
Note that during a MINOR version bump the PATCH version is preserved. This means that across MAJOR.MINOR versions PATCH version numbers will duplicate and diverge. This is by design. One consequence of this is that the PATCH number indicates, for every MAJOR.MINOR version, pretty much exactly how many commits have been made in that version's entire history.
For help on argument formats see `svnman help`.
bump-major
bump-major: usage: svnman bump-major [DIR...]
Create a new version branch from DIR, incrementing the MAJOR version number (and resetting the MINOR version number to zero).
Note that during a MAJOR version bump the PATCH version is preserved. This means that across MAJOR.MINOR versions PATCH version numbers will duplicate and diverge. This is by design. One consequence of this is that the PATCH number indicates, for every MAJOR.MINOR version, pretty much exactly how many commits have been made in that version's entire history.
For help on argument formats see `svnman help`.
browse
browse: usage: svnman browse [DIR...]
Open ViewVC in web browser for project in DIR.
This requires ViewVC to be configured via `svnman config`.
For help on argument formats see `svnman help`.
gen-doc
gen-doc: usage: svnman gen-doc
Generates svnman documentation for use in the project wiki.
You can find said documentation here:
For help on argument formats see `svnman help`.
fix-version
fix-version: usage: svnman fix-version [DIR...]
If the PATCH version number is left on an even value (perhaps due to a failure during 'release') then this subcommand will bump it to the next odd value, making it a valid development PATCH version number again. If the PATCH version number is already an odd value this subcommand does nothing and fails indicating error.
For more info on our version numbers see:
For help on argument formats see `svnman help`.
Errors
Potential svnman error levels and their meaning:
Error level | Error name | Error message |
---|---|---|
10 | ERR_HELP | help requested. |
11 | ERR_PHP_ERROR | PHP error. |
12 | ERR_PHP_EXCEPTION | unhandled exception. |
13 | ERR_NOT_IMPLEMENTED | functionality not implemented. |
14 | ERR_NOT_SUPPORTED | situation not supported. |
15 | ERR_INVALID_PATH | invalid path. |
16 | ERR_INVALID_REPO_VERSION | invalid repo version. |
17 | ERR_INVALID_REPO_NAME | invalid repo name. |
18 | ERR_INVALID_REPO_LOCATION | invalid repo location. |
19 | ERR_INVALID_WORKING_BASE | invalid working base. |
20 | ERR_INVALID_EXTERNALS | invalid svn:externals. |
21 | ERR_INVALID_EXTERNALS_DIR | invalid svn:externals directory. |
22 | ERR_INVALID_EXTERNALS_REV | invalid svn:externals revision. |
23 | ERR_INVALID_EXTERNALS_LOC | invalid svn:externals location. |
24 | ERR_INVALID_NAME | invalid name. |
25 | ERR_INVALID_CODE | invalid code. |
26 | ERR_INVALID_CONST | invalid const. |
27 | ERR_INVALID_ALIAS | invalid alias. |
28 | ERR_INVALID_VERSION_PATCH | invalid version PATCH. |
29 | ERR_INVALID_CONFIG | invalid config. |
30 | ERR_INVALID_SVN_INFO | invalid svn info. |
31 | ERR_MISSING_VERSION_FILE | missing version file. |
32 | ERR_MISSING_VERSION_PART | missing version part. |
33 | ERR_MISSING_PROJECT_NAME | missing project name. |
34 | ERR_MAJOR_VERSION_CONFLICT | MAJOR version conflict. |
35 | ERR_MINOR_VERSION_CONFLICT | MINOR version conflict. |
36 | ERR_PATCH_VERSION_EVEN | PATCH version is even (release). |
37 | ERR_PATCH_VERSION_ODD | PATCH version is odd (dev). |
38 | ERR_EXPECTED_BRANCHES | expceded "branches". |
39 | ERR_CHDIR_FAILED | chdir failed. |
40 | ERR_NO_EXTERNALS | no externals. |
41 | ERR_NO_HOME_ENV_VAR | no $HOME environment variable. |
42 | ERR_NO_EXECUTABLE_SVN | no executable `svn` command. |
43 | ERR_MISSING_HOME_DIR | missing $HOME directory. |
44 | ERR_CANNOT_MKDIR | cannot mkdir. |
45 | ERR_CANNOT_ACCESS_REPO | cannot access repo. |
46 | ERR_CANNOT_MAKE_TEMP_DIR | cannot make temp dir. |
47 | ERR_CANNOT_MATCH_VERSION_PATCH | cannot match version PATCH. |
48 | ERR_SVN_COMMAND_FAILED | svn command failed. |
49 | ERR_SVN_UNEXPECTED_OUTPUT | unexpected svn output. |
50 | ERR_NOT_WORKING_COPY | not an svn working copy. |
51 | ERR_HAS_CHANGES | found uncommitted changes. |
52 | ERR_FILE_WRITE | error writing file. |
53 | ERR_FILE_CLOSE | error closing file. |
54 | ERR_FILE_UNLINK | error unlinking file. |
55 | ERR_FILE_MISSING | file missing. |
56 | ERR_CODE_GEN_FAILED | code generation failed. |
57 | ERR_CONFIG_WRITE_FAILED | error writing config file. |
58 | ERR_UNSUPPORTED_FILE_TYPE | unsupported file type. |
59 | ERR_BRANCH_EXISTS | branch already exists. |
Miscellanea
Subversion
The svnman software makes use of the Subversion command-line interface. If Subversion is not installed then svnman won't work!
PHP
The svnman software is written mostly in the PHP programming language which we^H^HI love! :)
Other bits and pieces are done with JSON, Subversion and BASH.
JSON
We use the JavaScript Object Notation format for our configuration data.
BASH
The bash shell is our Unix shell of choice. You don't need Bash to run svnman but it is used by our build scripts.
HOME
We rely on the $HOME environment variable being set to indicate your home directory. We need to know where your home directory is so that we can save and load your configuration data (see config).
PHPBOM
Our svnman utility has first-class support for our PHPBOM library. Basically when you use svnman to create a new project you can optionally have the PHPBOM library automatically included in your project.
Notes
See versioning for information on our semantic version numbers.
Notes for implementers
If you are interested in incorporating this software into your project, here's what you need to know:
This software presumes that the Subversion project has the typical base directories:
- trunk
- branches
- tags
However, we don't use 'trunk' for development. Instead development happens in $major.$minor version branches. So version 0.3 is developed in 'branches/0.3' and version 1.0 is developed in 'branches/1.0'. When a version branch is released by this script 'trunk' can optionally be updated. Within tags the latest $major.$minor versions are maintained under 'tags/latest/$major.$minor' and releases are tagged under 'tags/release/$major/$minor/$patch'.
In order to run svnman you should create an svnman
symlink somewhere in your $PATH and point it to bin/svnman.php
, something like this:
$ ln -s /path/to/svnman/bin/svnman.php svnman
Notes for developers
If you're looking to set up a development environment for this project here's what you need to know:
$ svn co https://www.progclub.org/pcrepo/svnman/branches/1.0 svnman-1.0
Notes for ProgClub administrators
To release a version of this project use the software itself.
First, generate the documentation:
$ bin/dev/gen.sh
Then make sure your working copy is committed:
$ svn ci --message 'Work, work...'
Then run the release:
$ bin/dev/release.sh
You will be prompted to update the project documentation.
Tasks
TODO
MEDIUM
- TODO: bin/dev/gen.sh: 11: generate tasks.wiki with TODO and Done sections...
- TODO: inc/lib.php: 2264: this needs better reporting. Some colour coding would be nice too.
- TODO: inc/lib.php: 2267: need to support other version file formats. Especially *.sh and *.ini formats.
- TODO: inc/lib.php: 2270: add a --debug command-line option.
- TODO: inc/lib.php: 2272: add a 'latest' subcommand that reports if the current branch is the latest and if not what is.
- TODO: inc/lib.php: 2279: add support for 'browse' subcommand.
- TODO: inc/lib.php: 2281: add support for 'fix-version' subcommand. Will increment even patch version to odd number.
- TODO: inc/lib.php: 2284: clean up after ourselves, delete temp files and directories...
- TODO: inc/lib.php: 2287: add support for --tarball generation during release.
- TODO: inc/lib.php: 2289: improve the documentation.
- TODO: inc/lib.php: 2294: add a --json argument which causes program output to be in stable JSON format for better integration.
LOW
- THINK: inc/lib.php: 1590: do we want to just automatically mkdir -p the working base..?
- THINK: inc/lib.php: 2275: do we want an optional argument --version-file for manually nominating the version file..? (At the moment we prefer convention over configuration.)
- THINK: inc/lib.php: 2297: consider adding an interactive mode that will confirm options or ask questions.
Done
Stuff that's done. Latest stuff on top.