From ddfec219fd582419b914b77c6652ff03e7a2b8ca Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Sat, 13 Feb 2010 18:55:34 -0800 Subject: 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/ --- rbtools/postreview.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rbtools/postreview.py') 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) -- cgit v1.2.3