diff options
Diffstat (limited to 'firehose')
-rw-r--r-- | firehose/plugin/firehose_plugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firehose/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py index fba1db3..dd6f29b 100644 --- a/firehose/plugin/firehose_plugin.py +++ b/firehose/plugin/firehose_plugin.py @@ -81,6 +81,7 @@ class FirehosePlugin(cliapp.Plugin): self.base_path = tfs.getsyspath("/") self.make_workspace() self.make_branch(confs[0].landing) + self.insert_githook() self.reset_to_tracking(confs[0].landing) self.load_morphologies() for c in confs: @@ -106,6 +107,11 @@ class FirehosePlugin(cliapp.Plugin): repopath = root['repo'].replace(':', '/') self.gitpath = self.make_path("ws", root['myref'], repopath) + def insert_githook(self): + scp_cmd = ('scp', '-p', '-P', '29418', 'firehose@testgerrit.baserock.org:hooks/commit-msg', + self.gitpath+'/.git/hooks/commit-msg') + os.system(' '.join(scp_cmd)) + def reset_to_tracking(self, root): branch_head_sha = self.app.runcmd(['git', 'rev-parse', 'HEAD'], cwd=self.gitpath).strip() |