-
-
-
-
We should be making use of Django's permissions models, not specifically checking for is_staff. People who are staff do not necessarily have the permissions for modifying data. We have people marked as staff who can only add/modify review groups, for instance. Also, could you add some simple doc blocks?
-
-
It'd be nice to move this into SVNTool directly and provide documentation for the method, specifying what it does and the return values.
-
-
I'd rather pathinfo not be its own function. This can be done inline. cs.description = '\n'.join("%s %s" % (path['action'], path['path']) for path in log['changed_paths'])
-
-
-
-
-
-
Comments should be in sentence case, with a trailing '.' This should also have a blank line before it. If you could rewrite this to make it more clear, it would help. The "Allow no basedir" is grammatically awkward.
-
I'd rather get rid of this change here. The code that handles the basedir field in forms should take this into account by changing it to "/".
-
I'm not sure this is correct. A traceback is not really what we want here. It's useful information but perhaps wrong for this field. Maybe 'path_traceback'? Then the caller can decide what to show.
Improve json usefulness for post-commit hook
Review Request #210 — Created Jan. 25, 2008 and submitted
the main point of this change is to allow a staff user to specify submit_as=a-different-user when creating a review request so that user will be the one notified of reviews, etc. this enables using a post-commit hook to auto-create reviews for all or part of a repository. there are some side concerns related to this: * basedir must be allowed to be empty when creating diffs against a svn repository as opposed to a working copy. that is what the diffviewer change does; for the web interface the functionality is identical, but the json manually rips out the basedir when necessary, allowing a svn repo diff to be treated as "absolute." * added is_visible_to and is_mutable_by methods to the Request models to encapsulate the notion that "staff can always view and modify requests" * moved sending of mail into the models to avoid duplication of code in json and view * json new_diff includes traceback when something unexpected goes wrong * add get_changeset to svn to allow update_from_changenum for that scm