Repo reversion script fix

closes #2720