Match links by url instead of domain.

Exherbo has a setup where gerrit is at
https://galileo.mailstation.de/gerrit/ and jenkins is at
https://galileo.mailstation.de/jenkins/. gertty falsely thinks that the
jenkins link is a change and when clicked it weirdly starts to sync
random projects for 10 minutes before telling me that the change is not
found. This patch fixes it by matching on the full url.

Change-Id: I4261fce74d6cfaec736e478747592b001d82400d
This commit is contained in:
Wouter van Kesteren 2015-07-05 15:03:36 +02:00
parent 3b2b671ce4
commit 4d268e5679
1 changed files with 1 additions and 4 deletions

View File

@ -177,7 +177,6 @@ class BackgroundBrowser(webbrowser.GenericBrowser):
class App(object):
simple_change_search = re.compile('^(\d+|I[a-fA-F0-9]{40})$')
url_change_search = re.compile('^https?://.*$')
def __init__(self, server=None, palette='default', keymap='default',
debug=False, verbose=False, disable_sync=False,
@ -457,11 +456,9 @@ class App(object):
trailing_filename_re = re.compile('.*(,[a-z]+)')
def parseInternalURL(self, url):
if not self.url_change_search.match(url):
if not url.startswith(self.config.url):
return None
result = urlparse.urlparse(url)
if result.netloc != self.config.hostname:
return None
change = patchset = filename = None
path = [x for x in result.path.split('/') if x]
if path: