diff options
author | Christian Hammond <chipx86@chipx86.com> | 2010-02-13 18:55:34 -0800 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2010-02-13 18:55:34 -0800 |
commit | ddfec219fd582419b914b77c6652ff03e7a2b8ca (patch) | |
tree | a7e863256e07bfd657d0bf97801f561498fdade6 | |
parent | f16aed06ad9c2a90c2e4058351357ecce4188f0f (diff) |
Filter out usernames from Mercurial repository paths in .hgrc
We filtered out the username from a path when running 'hg svn info', but
not when reading from .hgrc. We now apply the same filtering logic. This
allows post-review to match a repository path with a username in it against
a repository path on a Review Board server.
Patch by Tom Saeger.
Reviewed at http://reviews.reviewboard.org/r/1390/
-rw-r--r-- | AUTHORS | 1 | ||||
-rwxr-xr-x | rbtools/postreview.py | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -26,3 +26,4 @@ Contributors: * Stacey Sheldon * Stefan Ring * Steven Russell + * Tom Saeger diff --git a/rbtools/postreview.py b/rbtools/postreview.py index e8ea416..207f8be 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -1924,6 +1924,10 @@ class MercurialClient(SCMClient): supports_parent_diffs=True) path = m.group(1).strip() + m2 = re.match(r'^(svn\+ssh|http|https)://([-a-zA-Z0-9.]*@)(.*)$', + path) + if m2: + path = '%s://%s' % (m2.group(1), m2.group(3)) return RepositoryInfo(path=path, base_path='', supports_parent_diffs=True) |