From: Eric S. Raymond Date: Thu, 27 Sep 2012 18:01:51 +0000 (-0400) Subject: AI0867's fix patch for SVN. X-Git-Tag: 1.0~19 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=81d8812fc76f69906c945087e0b343406a4629df;p=irker.git AI0867's fix patch for SVN. --- diff --git a/irkbot.py b/irkbot.py index a4fda6d..9652bb7 100755 --- a/irkbot.py +++ b/irkbot.py @@ -144,15 +144,14 @@ class SvnExtractor: self.repository = tok[11:] elif tok.startswith("commit="): self.commit = tok[7:] - self.project = os.path.basename(self.path) + self.project = os.path.basename(self.repository) self.author = self.svnlook("author") self.files = self.svnlook("dirs-changed") self.logmsg = self.svnlook("log") self.repo = None self.tcp = True self.channels = None - # SVN includes this in the path - self.branch = "" + self.rev = "r{0}".format(self.commit) def svnlook(self, info): return do("svnlook {0} {1} --revision {2}".format(info, self.repository, self.commit)) @@ -203,9 +202,9 @@ if __name__ == "__main__": # # ${project}: ${author} ${repo}:${branch} * ${rev} / ${files}: ${logmsg} ${url} if vcs == "svn": - template = '%(project)s: %(author)s %(repo)s:%(branch)s * %(rev)s / %(files)s: %(logmsg)s %(url)s' - else: template = '%(project)s: %(author)s %(repo)s * %(rev)s / %(files)s: %(logmsg)s %(url)s' + else: + template = '%(project)s: %(author)s %(repo)s:%(branch)s * %(rev)s / %(files)s: %(logmsg)s %(url)s' # Make command-line overrides possible. # Each argument of the form = can override the