Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix forkname/forknum regexps, to work with different patchsets

(-ck1/-ck3, -next-$(date), etc)

Signed-off-by: Stratos Psomadakis <>
  • Loading branch information...
1 parent 06e6449 commit 3e3592620d9bfa9abd381b52593c695f8dba1851 @psomas committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 ketchup
10 ketchup
@@ -143,14 +143,14 @@ def base(ver):
return v
def forkname(ver):
- try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?((\.\d+)?-((\w+)?(-)?(\d+)?))?',
- ver).group(7)
+ try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-([a-zA-Z]+)(-)?(\d+)?)?',
+ ver).group(5)
except: return None
def forknum(ver):
- return int(
- re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?((\.\d+)?-(\w+?)(-)?(\d+))?',
- ver).group(8))
+ try: return int(re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-([a-zA-Z]+)(-)?(\d+)?)?',
+ ver).group(7))
+ except: return None
def fork(ver):
try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?((\.\d+)?-(\w+(-)?(\d+)?))?',

0 comments on commit 3e35926

Please sign in to comment.
Something went wrong with that request. Please try again.