Fixes T11020. I think this resolves things -- $new_version (set above) should be used, not $new_log directly.
Specifically, we would get into trouble if the initial push failed for some reason (working copy not initialized yet, commit hook rejected, etc).