dispatch: pass the correct ui to runcommand
For commands that take a repo, repo.ui is passed as the ui to runcommand.
This restores that behaviour when the request has a repo.
archive: wrap the ui descriptor so it doesn't get closed
archival.tarit closes the fileobj if one is passed to it, which is undesired
when reading from '-'.
call reposetup for repositories returned from peer (
issue2864)
Extension setup functions were not being called when repositories were
obtained using the peer function instead of the repository function.