# HG changeset patch # User Steve Losh # Date 1254697038 14400 # Node ID 1596046f752c81ca12ce7b66d213e4aba9653e44 # Parent cdd63ba4a8f8c463110daf6dc96090f8fbe726ce Add the author count to the review command. diff -r cdd63ba4a8f8 -r 1596046f752c review/api.py --- a/review/api.py Sun Oct 04 18:45:19 2009 -0400 +++ b/review/api.py Sun Oct 04 18:57:18 2009 -0400 @@ -127,8 +127,6 @@ ] self.signoffs = [ _parse_signoff_data(self.repo['tip'][fn].data()) for fn in signofffns ] - - print self.comments, self.signoffs else: self.comments = [] self.signoffs = [] diff -r cdd63ba4a8f8 -r 1596046f752c review/extension_ui.py --- a/review/extension_ui.py Sun Oct 04 18:45:19 2009 -0400 +++ b/review/extension_ui.py Sun Oct 04 18:57:18 2009 -0400 @@ -33,7 +33,15 @@ # No other options matched, so we're at the basic review command. rev = opts.pop('rev') rd = ReviewDatastore(ui, repo) - rc = rd[rev] + cset = repo[rev] + rcset = rd[rev] + + author_count = len(set(comment.author for comment in rcset.comments)) + + ui.write('comments: %d comments from %d authors\n' % ( + len(rcset.comments), author_count)) + ui.write('signoffs: %d signoffs\n' % len(rcset.signoffs)) + cmdtable = { 'review': (review, [ diff -r cdd63ba4a8f8 -r 1596046f752c review/tests/util.py --- a/review/tests/util.py Sun Oct 04 18:45:19 2009 -0400 +++ b/review/tests/util.py Sun Oct 04 18:57:18 2009 -0400 @@ -16,7 +16,7 @@ os.mkdir(sandbox_path) os.chdir(sandbox_path) - commands.init(ui.ui()) + commands.init(_ui) sandbox = get_sandbox_repo() opts = { 'addremove': True, 'date': None, 'user': 'Review Tester', @@ -25,7 +25,7 @@ for filename in state: with open(filename, 'w') as f: f.write(state[filename]) - commands.commit(ui.ui(), sandbox, **opts) + commands.commit(_ui, sandbox, **opts) def teardown_sandbox(): os.chdir(os.path.realpath(os.path.join(sandbox_path, os.pardir)))