| OLD | NEW | 
|---|
| 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) | 
| OLD | NEW | 
|---|