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

Side by Side Diff: sitescripts/hg/bin/irchook.py

Issue 8476005: sitescripts: Pass branch to abpbot (Closed)
Patch Set: Created Sept. 29, 2012, 6:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os, subprocess, pipes 1 import os, subprocess, pipes
2 2
3 from sitescripts.utils import get_config 3 from sitescripts.utils import get_config
4 4
5 def hook(ui, repo, node=None, **kwargs): 5 def hook(ui, repo, node=None, **kwargs):
6 ctx = repo[node] 6 ctx = repo[node]
7 remote = [get_config().get('irchook', 'remote_command'), 7 remote = [get_config().get('irchook', 'remote_command'),
8 os.path.basename(repo.root), str(ctx.user()), str(ctx), 8 os.path.basename(repo.root), str(ctx.branch()), str(ctx.user()),
9 str(ctx.description())] 9 str(ctx), str(ctx.description())]
10 remote = ' '.join(map(lambda s: pipes.quote(s), remote)) 10 remote = ' '.join(map(lambda s: pipes.quote(s), remote))
11 11
12 command = ['ssh', get_config().get('irchook', 'remote_host'), remote] 12 command = ['ssh', get_config().get('irchook', 'remote_host'), remote]
13 subprocess.call(command) 13 subprocess.call(command)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld