Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer.py

Issue 2679173005: Rename Host.scm -> Host.git. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 UPDATE_WAIT_SECONDS = 10 42 UPDATE_WAIT_SECONDS = 10
43 RETRY_ATTEMPTS = 8 43 RETRY_ATTEMPTS = 8
44 44
45 45
46 class CommitAnnouncer(SingleServerIRCBot): 46 class CommitAnnouncer(SingleServerIRCBot):
47 _commit_detail_format = "%H\n%ae\n%s\n%b" # commit-sha1, author email, subj ect, body 47 _commit_detail_format = "%H\n%ae\n%s\n%b" # commit-sha1, author email, subj ect, body
48 48
49 def __init__(self, tool, announce_path, irc_password): 49 def __init__(self, tool, announce_path, irc_password):
50 SingleServerIRCBot.__init__(self, [(SERVER, PORT, irc_password)], NICKNA ME, NICKNAME) 50 SingleServerIRCBot.__init__(self, [(SERVER, PORT, irc_password)], NICKNA ME, NICKNAME)
51 self.announce_path = announce_path 51 self.announce_path = announce_path
52 self.git = tool.scm(path=tool.scm().checkout_root) 52 self.git = tool.git(path=tool.git().checkout_root)
53 self.commands = { 53 self.commands = {
54 'help': self.help, 54 'help': self.help,
55 'ping': self.ping, 55 'ping': self.ping,
56 'quit': self.stop, 56 'quit': self.stop,
57 } 57 }
58 self.last_commit = None 58 self.last_commit = None
59 59
60 def start(self): 60 def start(self):
61 if not self._update(): 61 if not self._update():
62 return 62 return
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 def __init__(self, tool, announce_path, irc_password): 199 def __init__(self, tool, announce_path, irc_password):
200 threading.Thread.__init__(self) 200 threading.Thread.__init__(self)
201 self.bot = CommitAnnouncer(tool, announce_path, irc_password) 201 self.bot = CommitAnnouncer(tool, announce_path, irc_password)
202 202
203 def run(self): 203 def run(self):
204 self.bot.start() 204 self.bot.start()
205 205
206 def stop(self): 206 def stop(self):
207 self.bot.stop() 207 self.bot.stop()
208 self.join() 208 self.join()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698