diff options
author | Colin Guthrie <colin@mageia.org> | 2013-10-07 10:16:42 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-10-07 10:16:42 +0000 |
commit | 264ceb41d6774b3f9338e50bc7e972d18121fa99 (patch) | |
tree | 2ac6aba24effba17197b3420c0539508c11a4377 /deployment | |
parent | b269d3f46f299e1123dacbf6be25f44abe1a305b (diff) | |
download | puppet-264ceb41d6774b3f9338e50bc7e972d18121fa99.tar puppet-264ceb41d6774b3f9338e50bc7e972d18121fa99.tar.gz puppet-264ceb41d6774b3f9338e50bc7e972d18121fa99.tar.bz2 puppet-264ceb41d6774b3f9338e50bc7e972d18121fa99.tar.xz puppet-264ceb41d6774b3f9338e50bc7e972d18121fa99.zip |
mgagit: Fix post-receive mailer.
* Fix python path
* Fix .git suffix stripping from repo shortname
* Remove left over debug printing
Diffstat (limited to 'deployment')
-rwxr-xr-x | deployment/mgagit/templates/git-post-receive-hook | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/deployment/mgagit/templates/git-post-receive-hook b/deployment/mgagit/templates/git-post-receive-hook index 72680d5a..aff07b17 100755 --- a/deployment/mgagit/templates/git-post-receive-hook +++ b/deployment/mgagit/templates/git-post-receive-hook @@ -1,4 +1,4 @@ -#! /usr/bin/env python2 +#!/usr/bin/python import sys import os @@ -35,14 +35,13 @@ git_multimail.REVISION_FOOTER_TEMPLATE = git_multimail.FOOTER_TEMPLATE # Override the Environment class to generate an apporpriate short name which is # used in git links and as an email prefix class LinksEnvironment(git_multimail.Environment): - REPO_NAME_RE = re.compile(r'^/git/(?P<name>.+?)$') + REPO_NAME_RE = re.compile(r'^/git/(?P<name>.+?)(?:\.git)?$') def get_repo_shortname(self): """Use the last part of the repo path, with ".git" stripped off if present.""" basename = os.path.abspath(self.get_repo_path()) m = self.REPO_NAME_RE.match(basename) - print self.REPO_NAME_RE if m: return m.group('name') else: |