From ffe6d9654dcde8735da3c1359af1302d90e21b38 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 06 2015 16:58:31 +0000 Subject: Add basic/start for the remove() method of the irc hook --- diff --git a/progit/hooks/irc.py b/progit/hooks/irc.py index 706bac0..40e2f3a 100644 --- a/progit/hooks/irc.py +++ b/progit/hooks/irc.py @@ -123,3 +123,17 @@ class Hook(BaseHook): #os.path.join(repopath, 'hooks', 'post-receive.irc') #) #os.chmod(os.path.join(repopath, 'hooks', 'post-receive.irc'), 0755) + + @classmethod + def remove(cls, project): + ''' Method called to remove the hook of a project. + + :arg project: a ``progit.model.Project`` object to which the hook + should be installed + + ''' + repopath = get_repo_path(project) + + #hook_path = os.path.join(repopath, 'hooks', 'post-receive.irc') + #if os.path.exists(hook_path): + #os.unlink(hook_path)