diff options
-rw-r--r-- | git_config.py | 5 | ||||
-rw-r--r-- | subcmds/upload.py | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/git_config.py b/git_config.py index dc209ba8..1382d5db 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -531,8 +531,11 @@ class Remote(object): | |||
531 | def SshReviewUrl(self, userEmail): | 531 | def SshReviewUrl(self, userEmail): |
532 | if self.ReviewProtocol != 'ssh': | 532 | if self.ReviewProtocol != 'ssh': |
533 | return None | 533 | return None |
534 | username = self._config.GetString('review.%s.username' % self.review) | ||
535 | if username is None: | ||
536 | username = userEmail.split("@")[0] | ||
534 | return 'ssh://%s@%s:%s/%s' % ( | 537 | return 'ssh://%s@%s:%s/%s' % ( |
535 | userEmail.split("@")[0], | 538 | username, |
536 | self._review_host, | 539 | self._review_host, |
537 | self._review_port, | 540 | self._review_port, |
538 | self.projectname) | 541 | self.projectname) |
diff --git a/subcmds/upload.py b/subcmds/upload.py index 569e31c1..b47b37b8 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -92,6 +92,11 @@ review.URL.autocopy can be set to a comma separated list of reviewers | |||
92 | who you always want copied on all uploads with a non-empty --re | 92 | who you always want copied on all uploads with a non-empty --re |
93 | argument. | 93 | argument. |
94 | 94 | ||
95 | review.URL.username: | ||
96 | |||
97 | Override the username used to connect to Gerrit Code Review. | ||
98 | By default the local part of the email address is used. | ||
99 | |||
95 | The URL must match the review URL listed in the manifest XML file, | 100 | The URL must match the review URL listed in the manifest XML file, |
96 | or in the .git/config within the project. For example: | 101 | or in the .git/config within the project. For example: |
97 | 102 | ||