Split up --repository-url and REPOSITORY into new options/settings.

Review Request #5246 — Created Jan. 13, 2014 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Split up --repository-url and REPOSITORY into new options/settings.

--repository-url and REPOSITORY had both previously allowed either a
path to be specified, or a repository name. We'd try for the name when
looking up a repository, but would try for the path in different ways
within the SCMClients. In the case of Subversion, this broke pretty
badly when using a repository name.

Now --repository-url has been split into --repository-url and
--repository, while REPOSITORY has been split into REPOSITORY_URL and
REPOSITORY.

The URL-based ones work as they previously did, while the non-URL ones
are used for repository name-based lookups only.

This will require that people update their scripts or .reviewboardrc
files if passing the old values for the settings, but in the long-run,
it should avoid a lot of problems.

Unit tests pass.

Tested with Subversion (which was the one that broke the most):

  • Posting a valid URL with --repository-url worked.
  • Posting a valid name with --repository-name worked and did not break the svn info command.
  • The above with their equivalent .reviewboardrc options worked.
  • Tested the above with invalid values and saw that it failed, as it should.
  • Switched repositories using svn switch to prevent path-based matching and re-did the above tests.
    Loading...