isotoma / leetveld

Django hosted private rietveld for code review
5 stars 0 forks source link

upload.py (issues 2, 8, 10) #12

Closed karenc closed 14 years ago

karenc commented 14 years ago

This pull request includes issues 9 and 11 so I'm going to close them.

Fix post-commit upload.py failing with new directory (issue 2)

The problem before was, the script tries to get the status (whether it was "A" added, "M" modified, or "D" deleted) of a file by "svn ls" the parent directory before the commit and after the commit. The parent directory didn't exist before the commit (since it's added in the commit), so "svn ls" fails...

I've fixed the problem by completely changing the implementation of get status. I'm now analyzing the output of "svn log -v". It gives you the status of every file in the commit. It is only slightly complicated when there are multiple revisions.

I've added some unit tests for the parts I've added or changed. Please have a look.

Fix pre-commit upload.py not detecting svn copied files (issue 8)

upload.py uses svn diff to detect what files are changed, but when you svn cp files without modifications, they don't show in svn diff. So when generating the diff, I add extra diff for svn cp files, diffing against an empty file. svn cp files will now show in the code review issue.

Improve upload.py subject length prompt (issue 10)

I've added a loop to prompt for the subject until it is not empty and within 100 characters long.

karenc commented 14 years ago

Need to refix issue 2

karenc commented 14 years ago

Ok, just updated my master branch. Ready for git pull.