Switch to unified view

a/Allura/push_re.py b/Allura/push_re.py
...
...
95
def format_changes(changes):
95
def format_changes(changes):
96
    ticket_groups = defaultdict(list)
96
    ticket_groups = defaultdict(list)
97
    for change in changes:
97
    for change in changes:
98
        for m in re_ticket_ref.finditer(change):
98
        for m in re_ticket_ref.finditer(change):
99
            ticket_groups[m.group(0)].append(change)
99
            ticket_groups[m.group(0)].append(change)
100
    try:
100
    cli = rest_api.RestClient(
101
        cli = rest_api.RestClient(
101
        base_uri='http://sourceforge.net', **CRED)
102
            base_uri='http://sourceforge.net', **CRED)
102
    for ref, commits in sorted(ticket_groups.iteritems()):
103
        for ref, commits in sorted(ticket_groups.iteritems()):
103
        ticket_num = ref[2:-1]
104
            ticket_num = ref[2:-1]
104
        ticket = cli.request(
105
            ticket = cli.request(
105
            'GET',
106
                'GET',
106
            urljoin('/rest/p/allura/tickets/', str(ticket_num)) + '/')['ticket']
107
                urljoin('/rest/p/allura/tickets/', str(ticket_num)) + '/')['ticket']
107
        verb = {
108
            verb = {
108
            'validation': 'Fix',
109
                'validation': 'Fix',
109
            'closed': 'Fix' }.get(ticket['status'], 'Address')
110
                'closed': 'Fix' }.get(ticket['status'], 'Address')
110
        yield ' * %s %s: %s\n' % (verb, ref, ticket['summary'])
111
            yield ' * %s %s: %s\n' % (verb, ref, ticket['summary'])
112
    except:
113
        print '*** ERROR CONTACTING FORGE FOR TICKET SUMMARIES ***'
114
        for ci in changes:
115
            yield ci
111
116
112
def command(*args):
117
def command(*args):
113
    if len(args) == 1 and isinstance(args[0], basestring):
118
    if len(args) == 1 and isinstance(args[0], basestring):
114
        argv = shlex.split(args[0])
119
        argv = shlex.split(args[0])
115
    else:
120
    else: