Add testing features to the pre-upload hook

Add two different ways to test the pre-upload hook.  You can either
pass a list of commit hashes and run the upload hook against those
commits or you can use the '--rerun-since' option to re-run against
all non-bot commits that have happened since a certain date.

BUG=None
TEST=In chromium-os-overlay run:
  .../src/repohooks/pre-upload.py --rerun-since=2013-06-01
TEST=In chromium-os-overlay, test normal case:
  repo start foo .
  git reset --hard b4d4048a~
  git cherry-pick b4d4048a
  .../src/repohooks/pre-upload.py

Change-Id: I3db65b64f38e467cef67dced91f2c4f9f85b663d
Reviewed-on: https://gerrit.chromium.org/gerrit/60131
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
1 file changed