hgweb: create function to perform actions on new repo
We perform some common tasks when a new repo instance is obtained. In
preparation for changing how we obtain repo instances, factor this
functionality into a standalone function.
Greg Ward, author of the original bfiles extension
Na'Tosha Bard of Unity Technologies
Fog Creek Software
Special thanks to the University of Toronto and the UCOSP program