I really hope that this won't be required too often in production, but when it will be needed, it will save us unsatisfied user and/or support request. And it's for sure useful for development and debugging. "It" is ability to refresh a repo from web UI. Typical usecase during debugging: create a repo, then go to FS and replace empty created repo with one containing content useful for testing, then hit "refresh" action, and be able to see it in web UI.
So, I at least add SCM Admin action, /p/test/admin/git/refresh, and ideally that action should be available in Admin actions list for SCM repo.
38f36aec8287f291e0ebe85ad3164c8dfaafe84a seems mostly unnecessary - allura/controllers/repository.py already @exposes a /refresh URL. Maybe enhance that method, such that if there is a referer it calls flash() and redirects). Also - shouldn't this publish a message to queue a refresh (like in repository.py does) instead of doing it immediately - which make take a while.
Second commit is fine.
Thanks Dave, done as you suggested.