| Index: sitescripts/hg/bin/irchook.py |
| =================================================================== |
| --- a/sitescripts/hg/bin/irchook.py |
| +++ b/sitescripts/hg/bin/irchook.py |
| @@ -2,15 +2,18 @@ import os |
| import subprocess |
| import pipes |
| from sitescripts.utils import get_config |
| def hook(ui, repo, node=None, **kwargs): |
| ctx = repo[node] |
| + branches = ctx.bookmarks() |
|
Vasily Kuznetsov
2017/05/05 09:23:08
I wonder if we could give a better name to this va
Wladimir Palant
2017/05/05 09:50:24
Let's go with commmit_identifiers.
Vasily Kuznetsov
2017/05/05 09:57:33
I like this.
|
| + if len(branches) == 0 or ctx.branch() != 'default': |
|
Vasily Kuznetsov
2017/05/05 09:23:08
Since branches is a list we could just write `not
Wladimir Palant
2017/05/05 09:50:24
Done.
|
| + branches.append(ctx.branch()) |
| remote = [get_config().get('irchook', 'remote_command'), |
| - os.path.basename(repo.root), str(ctx.branch()), str(ctx.user()), |
| + os.path.basename(repo.root), ','.join(branches), 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) |