Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix forkname/forknum regexps, to work with different patchsets

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

Signed-off-by: Stratos Psomadakis <psomas@cslab.ece.ntua.gr>
  • Loading branch information...
commit 3e3592620d9bfa9abd381b52593c695f8dba1851 1 parent 06e6449
Stratos Psomadakis authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 ketchup
10 ketchup
View
@@ -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+)?))?',
Please sign in to comment.
Something went wrong with that request. Please try again.