Mercurial > hg > CommitWatcher
comparison commitwatcher/agent.py @ 16:59c94aaf311c
almost does somethign
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 28 Sep 2013 09:44:26 -0700 |
parents | 77118f83b5b7 |
children | 9ec036da252e |
comparison
equal
deleted
inserted
replaced
15:77118f83b5b7 | 16:59c94aaf311c |
---|---|
78 break | 78 break |
79 | 79 |
80 # TODO: could break this in to added, modified, removed, renamed | 80 # TODO: could break this in to 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'): | |
84 files.setdefault('added', set()).add(a_b['target']) | |
85 elif a_b['target'] in ('/dev/null', 'dev/null'): | |
86 files.setdefault('removed', set()).add(a_b['source']) | |
83 else: | 87 else: |
84 raise NotImplementedError("%s %s" % (a_b['source'], a_b['target'])) | 88 raise NotImplementedError("source: %s; target: %s" % (a_b['source'], a_b['target'])) |
89 | |
90 # xxx flatten for simplicity for now and hope i don't regret this | |
91 files = set(sum([list(item) for item in files.values()], [])) | |
85 | 92 |
86 return files | 93 return files |
87 | 94 |
88 def diff_url(self, link): | 95 def diff_url(self, link): |
89 """ | 96 """ |
98 """ | 105 """ |
99 revision -- revision link | 106 revision -- revision link |
100 """ | 107 """ |
101 | 108 |
102 raw_rev = self.diff_url(revision) | 109 raw_rev = self.diff_url(revision) |
103 print raw_rev | |
104 | 110 |
105 # get paths from diff | 111 # get paths from diff |
112 paths = self.lsdiff(raw_rev) | |
113 print '%s :\n%s\n' % (revision, ', '.join(sorted(paths))) |