equal
deleted
inserted
replaced
18 """List issues associated with the project""" |
18 """List issues associated with the project""" |
19 |
19 |
20 # Process options |
20 # Process options |
21 show_all = opts['all'] |
21 show_all = opts['all'] |
22 properties = [] |
22 properties = [] |
23 date_match = lambda x: True |
23 match_date, date_match = False, lambda x: True |
24 if opts['date']: |
24 if opts['date']: |
25 date_match = util.matchdate(opts['date']) |
25 match_date, date_match = True, util.matchdate(opts['date']) |
26 |
26 |
27 # Find issues |
27 # Find issues |
28 issues_path = os.path.join(repo.root, issues_dir) |
28 issues_path = os.path.join(repo.root, issues_dir) |
29 if not os.path.exists(issues_path): return |
29 if not os.path.exists(issues_path): return |
30 |
30 |
48 for property,value in properties: |
48 for property,value in properties: |
49 property_match = property_match and (mbox[0][property] == value) |
49 property_match = property_match and (mbox[0][property] == value) |
50 if not show_all and (not properties or not property_match) and (properties or mbox[0]['State'].upper() == state['fixed'].upper()): continue |
50 if not show_all and (not properties or not property_match) and (properties or mbox[0]['State'].upper() == state['fixed'].upper()): continue |
51 |
51 |
52 |
52 |
53 if not date_match(util.parsedate(mbox[0]['date'], [date_format])[0]): continue |
53 if match_date and not date_match(util.parsedate(mbox[0]['date'], [date_format])[0]): continue |
54 ui.write("%s (%d) [%s]: %s\n" % (issue[len(issues_path)+1:], # +1 for trailing / |
54 ui.write("%s (%d) [%s]: %s\n" % (issue[len(issues_path)+1:], # +1 for trailing / |
55 len(mbox)-1, # number of replies (-1 for self) |
55 len(mbox)-1, # number of replies (-1 for self) |
56 mbox[0]['State'], |
56 mbox[0]['State'], |
57 mbox[0]['Subject'])) |
57 mbox[0]['Subject'])) |
58 |
58 |