Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/unpaidbill/buildbot
Browse files Browse the repository at this point in the history
* 'master' of git://github.com/unpaidbill/buildbot:
  Added category and repository options, changed the timestamp to something CVS understands
  • Loading branch information
Dustin J. Mitchell committed May 27, 2010
2 parents cea6ef2 + d019d41 commit 9c97f8e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions buildbot/changes/mail.py
Expand Up @@ -26,9 +26,11 @@ class MaildirSource(MaildirService, util.ComparableMixin):
compare_attrs = ["basedir", "pollinterval", "prefix"]
name = None

def __init__(self, maildir, prefix=None):
def __init__(self, maildir, prefix=None, category=None, repository=None):
MaildirService.__init__(self, maildir)
self.prefix = prefix
self.category = category
self.repository = repository
if prefix and not prefix.endswith("/"):
log.msg("%s: you probably want your prefix=('%s') to end with "
"a slash")
Expand Down Expand Up @@ -153,7 +155,7 @@ def parse(self, m, prefix=None):

# calculate a "revision" based on that timestamp
theCurrentTime = datetime.datetime.utcfromtimestamp(float(when))
rev = theCurrentTime.isoformat()
rev = theCurrentTime.strftime('%Y-%m-%d %H:%M:%S')

subject = m["subject"]
# syncmail puts the repository-relative directory in the subject:
Expand Down Expand Up @@ -238,7 +240,9 @@ def parse(self, m, prefix=None):
comments = comments.rstrip() + "\n"

change = changes.Change(who, files, comments, isdir, when=when,
branch=branch, revision=rev)
branch=branch, revision=rev,
category=self.category,
repository=self.repository)

return change

Expand Down

0 comments on commit 9c97f8e

Please sign in to comment.