[bts-link] 02/02: Support exceptions for the non-default closing status and variable tracker name
Olivier Berger
obergix at moszumanska.debian.org
Mon Oct 19 15:02:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
obergix pushed a commit to branch only-allura
in repository bts-link.
commit 282f04e80778915ecdb319d4d88d32a59cd0b537
Author: Olivier Berger <olivier.berger at telecom-sudparis.eu>
Date: Mon Oct 19 16:50:22 2015 +0200
Support exceptions for the non-default closing status and variable tracker name
---
btslink.yaml | 14 ++++++++++----
remote/allura.py | 12 +++++++++---
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/btslink.yaml b/btslink.yaml
index 544f619..f9b439e 100644
--- a/btslink.yaml
+++ b/btslink.yaml
@@ -12,6 +12,16 @@ btsnode:
logdir: /home/btslink/bts-link/log
remotes:
+ allura:
+ # exceptions to the sourceforgeallura catchall first (different closing status)
+ enigmail:
+ uri: https://sourceforge.net/p/enigmail/
+ uri-re: https?://sourceforge.net/p/enigmail/[^/]+/([0-9]+)/?
+ closing: fixed
+ # newest sourceforge trackers catchall
+ sourceforgeallura:
+ uri: https://sourceforge.net/p
+ uri-re: https?://sourceforge.net/p/(?!enigmail).*/[^/]+/([0-9]+)/?
bitbucket:
bitbucket:
uri: http://bitbucket.org/
@@ -412,10 +422,6 @@ remotes:
savannah-nongnu:
uri: http://savannah.nongnu.org/bugs/
uri-re: https?://savannah.nongnu.org/bugs/(?:index.php|)\?(?:(?:.*&)*item_id=)?([0-9]+)
- allura:
- sourceforgeallura:
- uri: https://sourceforge.net/p
- uri-re: https?://sourceforge.net/p/(?:.*)/bugs/([0-9]+)/?
sourceforge2:
sourceforge:
uri: http://sf.net/tracker/
diff --git a/remote/allura.py b/remote/allura.py
index de2f13d..64345a5 100644
--- a/remote/allura.py
+++ b/remote/allura.py
@@ -72,7 +72,7 @@ class RemoteAlluraTracker(RemoteBts):
# override base class method to extract the URL components as useful as for _getUri
def extractBugid(self, uri):
- bugre = re.compile(r"^(?P<uri>.*)/p/(?P<project>.*)/(?P<type>.*)/(?P<id>[0-9]+)/?$")
+ bugre = re.compile(r"^(?P<uri>.*)/p/(?P<project>[^/]+)/(?P<type>[^/]+)/(?P<id>[0-9]+)/?$")
res = bugre.match(uri)
if res:
return res.groupdict()
@@ -84,8 +84,14 @@ class RemoteAlluraTracker(RemoteBts):
return "%(uri)s/p/%(project)s/%(type)s/%(id)s/" % urlcomponents
def isClosing(self, status, resolution):
- # All status starting by 'closed' are matched, again I hope the status are more or less constant among projects, but not sure
- return status and (string.find(status, "closed") == 0)
+ # All status starting by 'closed' are matched by default, unless otherwise specified in the 'closing' conf value
+ if not status:
+ return False
+ else:
+ if 'closing' in self._cnf:
+ return status in self._cnf['closing']
+ else:
+ return (string.find(status, 'closed') == 0)
def isWontfix(self, status, resolution):
# Again I hope the status are more or less constant among projects, but not sure
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bts-link/bts-link.git
More information about the bts-link-commits
mailing list