`mpbb checkout` accepts a new `--git` option, which is also the default.
It is an error to specify it alongside `--svn` or `--svn-url`.
It also accepts `--ports-branch`, which can be used to fetch Git objects
from a particular branch of a remote repository.
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152533 d073be05-634f-4543-b044-5fe20cf6d1d6
`checkout` now calls a VCS-specific function to do the heavy lifting.
Factor out the Subversion-related code and improve it:
- Use `svn info` to check for an existing repository instead of just
looking for a `.svn` directory.
- Refuse to checkout into a nonempty directory. Subversion itself won't
complain in this scenario: `svn --non-interactive checkout` registers
conflicts and exits with status 0. (This might happen if a user
switches version control systems and doesn't remove the preexisting
working tree.)
- Print URL of the remote repository.
- It doesn't hurt to run `svn cleanup` on a clean repository, so just
run it always.
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152530 d073be05-634f-4543-b044-5fe20cf6d1d6
- Rename options and parameters to be VCS-agnostic.
- Don't assume that the jobs tools and ports tree are stored in the same
repository. Add new options "--jobs-url" and "--ports-url" and
deprecate "--svn-url".
- Conditionalize existing Subversion code.
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152529 d073be05-634f-4543-b044-5fe20cf6d1d6
The `--help` option has been replaced by a new `help` subcommand.
Invoking `mpbb help` displays global usage and available subcommands,
while `mpbb help <subcommand>` displays subcommand-specific usage.
Each subcommand script `mpbb-FOO` must now define a function `FOO-usage`
that prints its specific help to standard out.
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152528 d073be05-634f-4543-b044-5fe20cf6d1d6
À la Git, command-line options that are applicable to all subcommands
(e.g., `--prefix`) are now given before the subcommand name, while
options that are specific to particular subcommands (e.g.,
`--archive-site`) come after. For example, this:
mpbb checkout --prefix /opt/local --svn /usr/bin/svn
is now:
mpbb --prefix /opt/local checkout --svn /usr/bin/svn
This is a practical improvement as well as a conceptual one, as the
Buildbot configuration will be able to factor out the common command
prefix like so:
cmd = ('./mpbb/mpbb', '--prefix', WithProperties(prefix))
cmd_selfupdate = cmd + ('selfupdate',)
cmd_checkout = cmd + ('checkout', '--svn-url', svnurl)
[...]
For backwards compatibility with our current Buildbot deployment, all
subcommands except `list-subports` still accept `--prefix`.
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152525 d073be05-634f-4543-b044-5fe20cf6d1d6