diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-11-25 09:43:02 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-11-25 09:43:02 +0100 |
commit | 9e24a4a7a91cab92237e511b8cfd7664473b979a (patch) | |
tree | a60a56514cd19e11013588d885601ba9adc332a6 | |
parent | a8806260e704f44904b88f9902db5514a0a1a337 (diff) | |
parent | 2b20521a9418aaa0e8e8323689387f59ac3ea34e (diff) |
Merge branch 'master' of /srv/git/gitnotipy
-rwxr-xr-x | gitnoti.py | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -1,5 +1,21 @@ #!/usr/bin/env python +# gitnotipy - An IRC bot which announces changes to a collection of git repositories +# Copyright (C) 2009-2010 Jon Bergli Heier + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + import git, os, sys, time, pyinotify, netrc from optparse import OptionParser from twisted.words.protocols import irc @@ -227,13 +243,14 @@ class Bot(irc.IRCClient): def get_commits(self, repo, name): try: if '..' in name: - frm, to = name.split('..') - commits = list(repo.iter_commits('%s..%s' % (frm, to))) + commits = list(repo.iter_commits(name)) else: commits = [repo.commit(name)] except ValueError: return [] - except git.errors.GitCommandError: + except git.exc.BadObject: + return [] + except git.exc.GitCommandError: return [] return commits |