Some people do want their credentials in paths to match, so this will end up breaking some users out there.
It's probably also not the right place to do the match. This code shouldn't enforce lookup-related policies, and instead should use what it's given.
I think the right place for this is directly in
rbt setup-repo. I could see setup-repo trying a couple variations (with and without credentials) for the lookups, but not
rbt postor anything on the RB side. What we want to strongly encourage is using name-based lookups, and not path-based, since they're faster and less error-prone.
rb setup-repowill set up a path-based repo, but could benefit from having this more fuzzy match to find the proper repo, if a direct match doesn't exist.
Switch to fuzzy search in setup-repo to match repository path
Review Request #5724 — Created April 22, 2014 and submitted
Sometimes repository path on reviewboard server and on local copy of repository may contains slight difference (trailing slash, user credentials, etc.)
Now rbt setup-repo offers repository with closest path to local path.
Unit testing with nosetests
Ran 108 tests in 38.481s
The code looks better, but can you update your change description to describe the new behavior?
Change description due to new behavior
I'm going to make some changes to make this more compatible with older (and newer) versions of python, then push it. Thanks!