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

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

Issue 29430555: Issue 5212 - IRC hook should report bookmarked branches (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Changed variable name Created May 5, 2017, 9:49 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 1 import os
2 import subprocess 2 import subprocess
3 import pipes 3 import pipes
4 4
5 from sitescripts.utils import get_config 5 from sitescripts.utils import get_config
6 6
7 7
8 def hook(ui, repo, node=None, **kwargs): 8 def hook(ui, repo, node=None, **kwargs):
9 ctx = repo[node] 9 ctx = repo[node]
10 commit_identifiers = ctx.bookmarks()
11 if not commit_identifiers or ctx.branch() != 'default':
12 commit_identifiers.append(ctx.branch())
10 remote = [get_config().get('irchook', 'remote_command'), 13 remote = [get_config().get('irchook', 'remote_command'),
11 os.path.basename(repo.root), str(ctx.branch()), str(ctx.user()), 14 os.path.basename(repo.root), ','.join(commit_identifiers),
12 str(ctx), str(ctx.description())] 15 str(ctx.user()), str(ctx), str(ctx.description())]
13 remote = ' '.join(map(lambda s: pipes.quote(s), remote)) 16 remote = ' '.join(map(lambda s: pipes.quote(s), remote))
14 17
15 command = ['ssh', get_config().get('irchook', 'remote_host'), remote] 18 command = ['ssh', get_config().get('irchook', 'remote_host'), remote]
16 subprocess.call(command) 19 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