From b423c7b8a732da78ef70e3ad052e7454e4025a2b Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 13 Oct 2012 14:01:56 -0700 Subject: [PATCH] tracstats: additional version check. --- tracstats/web_ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracstats/web_ui.py b/tracstats/web_ui.py index b418c35..d29f2be 100644 --- a/tracstats/web_ui.py +++ b/tracstats/web_ui.py @@ -33,14 +33,14 @@ # repositories. Where the "rev" field was previously unique, # the "(repos,rev)" fields are now unique. Doing it this way # is a big performance boost. -if trac.__version__.startswith('0.12'): +if any(trac.__version__.startswith(s) for s in ('0.12','0.13','1.')): USING = "on r.repos = nc.repos and r.rev = nc.rev" else: USING = "using (rev)" # In version 0.12, support for multiple repositories was # added. We use the reponame to generate proper changeset links. -if trac.__version__.startswith('0.12'): +if any(trac.__version__.startswith(s) for s in ('0.12','0.13','1.')): REPOS = 'r.repos' else: REPOS = "'' as repos"