# HG changeset patch # User Jeff Hammel # Date 1380386666 25200 # Node ID 59c94aaf311c18adb9c409cee2d31a39ef58f534 # Parent 77118f83b5b7b8bc95958104e9dbcafc12ad9719 almost does somethign diff -r 77118f83b5b7 -r 59c94aaf311c commitwatcher/agent.py --- a/commitwatcher/agent.py Sat Sep 28 09:20:14 2013 -0700 +++ b/commitwatcher/agent.py Sat Sep 28 09:44:26 2013 -0700 @@ -80,8 +80,15 @@ # TODO: could break this in to added, modified, removed, renamed if a_b['source'] == a_b['target']: files.setdefault('modified', set()).add(a_b['source']) + elif a_b['source'] in ('/dev/null', 'dev/null'): + files.setdefault('added', set()).add(a_b['target']) + elif a_b['target'] in ('/dev/null', 'dev/null'): + files.setdefault('removed', set()).add(a_b['source']) else: - raise NotImplementedError("%s %s" % (a_b['source'], a_b['target'])) + raise NotImplementedError("source: %s; target: %s" % (a_b['source'], a_b['target'])) + + # xxx flatten for simplicity for now and hope i don't regret this + files = set(sum([list(item) for item in files.values()], [])) return files @@ -100,6 +107,7 @@ """ raw_rev = self.diff_url(revision) - print raw_rev # get paths from diff + paths = self.lsdiff(raw_rev) + print '%s :\n%s\n' % (revision, ', '.join(sorted(paths)))