comparison commitwatcher/agent.py @ 18:53533334469f

commitwatcher/agent.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 28 Sep 2013 10:55:49 -0700
parents 9ec036da252e
children 091fd9f40b05
comparison
equal deleted inserted replaced
17:9ec036da252e 18:53533334469f
75 for prefix in ('a/', 'b/'): 75 for prefix in ('a/', 'b/'):
76 if a_b[i].startswith(prefix): 76 if a_b[i].startswith(prefix):
77 a_b[i] = a_b[i][len(prefix):] 77 a_b[i] = a_b[i][len(prefix):]
78 break 78 break
79 79
80 # TODO: could break this in to added, modified, removed, renamed 80 # added, modified, removed, renamed
81 if a_b['source'] == a_b['target']: 81 if a_b['source'] == a_b['target']:
82 files.setdefault('modified', set()).add(a_b['source']) 82 files.setdefault('modified', set()).add(a_b['source'])
83 elif a_b['source'] in ('/dev/null', 'dev/null'): 83 elif a_b['source'] in ('/dev/null', 'dev/null'):
84 files.setdefault('added', set()).add(a_b['target']) 84 files.setdefault('added', set()).add(a_b['target'])
85 elif a_b['target'] in ('/dev/null', 'dev/null'): 85 elif a_b['target'] in ('/dev/null', 'dev/null'):