-
-
Instead of setting front and line based on fixed indexes, you should be able to do: front, line = line.split(" ", 1) You will then have to append the space later, but this makes it a lot cleaner, as this code condenses to: if line.startswith("+++ ") or line.startswith("--- ") or line.startswith("Index: "): front, line = line.split(" ", 1)
-
-
-
-
I'd instead do: key, value = info.split(": ", 1) if key == "URL": url = value elif key == "Repository Root": root = value
-
You're going to want to use the urlparse module to build the URL, I think, so we don't end up with "../" and stuff in the URL.
-
I'm not a huge fan of the "x and y or z" expression. Can you break this apart a little? I'm also not sure what this particular expression is doing.
-
-
No need for the outer parens. I wonder if we'll have to account for anything other than "/". Probably okay for now. Does this take care of bug #446? Also, could you put the bug numbers this change affects in the bug list on the review request?
Issue 451: handle svn switch'd paths
Review Request #347 — Created April 5, 2008 and submitted
Fixes: http://code.google.com/p/reviewboard/issues/detail?id=451 Server code should still be backwards compatible with old unmodified versions of post-commit, as it only assumes the diff paths are absolute if they begin with a leadling slash I've only just started using this software and I don't really know my way around the code yet, so I don't know if I've done this the right way by you guys... please let me know :) Also I'm not sure what people/groups this should be going to, but I picked some at random :)
Made sure server still works with old version of post-review Tested posting & reposting a review for unswitched and switched files, some addd, some modified, some deleted. svn only