Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/hg/bin/irchook.py

Issue 8327353: Crawler backend (Closed)
Patch Set: Created Sept. 27, 2012, 2:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sitescripts/hg/bin/irchook.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/sitescripts/hg/bin/irchook.py
@@ -0,0 +1,13 @@
+import os, subprocess, pipes
+
+from sitescripts.utils import get_config
+
+def hook(ui, repo, node=None, **kwargs):
+ ctx = repo[node]
+ remote = [get_config().get('irchook', 'remote_command'),
+ os.path.basename(repo.root), str(ctx.user()), str(ctx),
+ str(ctx.description())]
+ remote = ' '.join(map(lambda s: pipes.quote(s), remote))
+
+ command = ['ssh', get_config().get('irchook', 'remote_host'), remote]
+ subprocess.call(command)
« no previous file with comments | « sitescripts/hg/bin/__init__.py ('k') | sitescripts/web.py » ('j') | sitescripts/web.py » ('J')

Powered by Google App Engine
This is Rietveld