Repo.py: Use log for debug messages.
Repo.py: Rewrote needs_pull and needs_push to use iter_commits()