
benbenntt got a fish trophy!
git http or https remote with username name in remote url
Review Request #1771 — Created Sept. 8, 2010 and discarded
issue 1803 git http /ftps / https remote origin with username name in remote url. http://code.google.com/p/reviewboard/issues/detail?id=1803 Added reviewboard.repo.url configuration option to set the repo url to use when posting a review. Usage: git config reviewboard.repo.url 'https://whatismyrepourl/path/.git' Added --remove-username If url contains a username, it removes the username when posting a review. Example: https://myusername@whatismyrepourl/path/.git becomes https://whatismyrepourl/path/.git
-
-
rbtools/postreview.py (Diff revision 2) You don't need the parentheses here. I'd also like it if it was explicit about the different prefixes: if origin_url.startswith('http://') or origin_url.startswith('https://'): You don't need ftp, because as far as I know, there's no git ftp transport :)
-
BE
Change Summary:
More robust removal of the username and adding option to configuration origin url.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+80 -3) |
BE
Change Summary:
Remove extra spaces this time for real,oops. Made change easier to diff.
Diff: |
Revision 5 (+79 -1) |
---|
OR
-
Works for me against a 1.5 RC1 server.
-
rbtools/postreview.py (Diff revision 6) There needs to be a space added at the end of the first line.
-
-
-
rbtools/postreview.py (Diff revision 6) The first line should always be a one-line summary. Then a blank line, followed by any human-readable documentation. The information about Python versions would belong as comments, not in the documentation. However, we absolutely must support Python 2.4, so you should use the old version of the results from urlparse.
-
-
rbtools/postreview.py (Diff revision 6) Blank line before the commets. Comments should always be in sentence casing, and must have a space between the "#" and text.
-
-
rbtools/postreview.py (Diff revision 6) This is sort of weird. Please do: for url_schema in url_schemas: if url.startswith(url_schema): ...
-
rbtools/postreview.py (Diff revision 6) Can be combined to one line. Parameters must always have a space between the preceding comma and the parameter. So, url.replace(url, http)
-
-
-
-
-
-
rbtools/postreview.py (Diff revision 6) So, I'd actually rather not go this route of having the option, even if it's configurable. It means people have to do a lot more manual work to get going. Instead, it'd be much better for Review Board to try two versions of the URL. One with the username, one without. There are other SCMClients (such as the Perforce one) that do a variety of checks for repository names.
-
rbtools/tests.py (Diff revision 6) Only special operator functions built-in to Python can have the __foo__ naming convention. This should be _get_urls.
-
-
rbtools/tests.py (Diff revision 6) The previous statement should have just returned this instead of storing in a variable first.
-
rbtools/tests.py (Diff revision 6) Unit test docstrings must always be only one line that briefly describes the unit test. Same line as the """. This is what we'll show when verbosely showing the unit tests that are running.
-
-