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

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

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.
Description From Last Updated

Do we really want to do this kind of breakage in a .z release?

daviddavid
chipx86
david
  1. 
      
  2. docs/rbtools/rbt/commands/diff.txt (Diff revision 2)
     
     
     
     
    Show all issues

    Do we really want to do this kind of breakage in a .z release?

    1. Honestly, I wasn't sure. I'd typically say no, except we really are stupidly broken with Subversion. If you have multiple possible repository paths OR set REPOSITORY=, then you're just busted.

      What I suppose I could do is move this to master, and for 1.5.x I could patch Subversion to not include the URL if it's not prefixed with https or svn+ssh or whatever.

    2. That sounds good to me.

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...