Handle gerrit 3.x style internal urls
A new style of internal url appears in Gerrit 3.x: /c/PROJECT/+/NUMBER This handles that in internal links and updates the terminal integration docs with the new URL format as well. Change-Id: I30bc6194b1b467b2e6500c5f11e5d06de1aea721
This commit is contained in:
parent
119f96f293
commit
bb9d860dde
@ -203,7 +203,7 @@ in Gertty::
|
|||||||
URxvt.keysym.C-Delete: perl:matcher:last
|
URxvt.keysym.C-Delete: perl:matcher:last
|
||||||
URxvt.keysym.M-Delete: perl:matcher:list
|
URxvt.keysym.M-Delete: perl:matcher:list
|
||||||
URxvt.matcher.button: 1
|
URxvt.matcher.button: 1
|
||||||
URxvt.matcher.pattern.1: https:\/\/review.example.org/(\\#\/c\/)?(\\d+)[\w]*
|
URxvt.matcher.pattern.1: https:\/\/review.example.org/(\\#/c/)?(c/[^\\+]+\\+/)?(\\d+)[\\w]*
|
||||||
URxvt.matcher.launcher.1: gertty --open $0
|
URxvt.matcher.launcher.1: gertty --open $0
|
||||||
|
|
||||||
You will want to adjust the pattern to match the review site you are
|
You will want to adjust the pattern to match the review site you are
|
||||||
|
@ -637,7 +637,15 @@ class App(object):
|
|||||||
change = patchset = filename = None
|
change = patchset = filename = None
|
||||||
path = [x for x in result.path.split('/') if x]
|
path = [x for x in result.path.split('/') if x]
|
||||||
if path:
|
if path:
|
||||||
change = path[0]
|
if path[0] == 'c':
|
||||||
|
while path:
|
||||||
|
path.pop(0)
|
||||||
|
if path[0] == '+':
|
||||||
|
path.pop(0)
|
||||||
|
change = path.pop(0)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
change = path[0]
|
||||||
else:
|
else:
|
||||||
path = [x for x in result.fragment.split('/') if x]
|
path = [x for x in result.fragment.split('/') if x]
|
||||||
if path[0] == 'c':
|
if path[0] == 'c':
|
||||||
|
Loading…
Reference in New Issue
Block a user