title: Mercurial API: hg.repository with https
body: <p>I'm trying to write a simple script that clones an existing Mercurial kiln repository that uses https authentications. I have this snippet:</p>
  
  <pre><code>from mercurial import hg, ui
  
  repo = hg.repository(ui.ui(), "https://something.kilnhg.com/...")
  </code></pre>
  
  <p>Normally, whenever I would clone this repo or something, Mercurial would ask me to authenticate myself with a username and password. Instead, the above snippet just isn't getting authorized and gives me this error:</p>
  
  <pre><code>[a bunch of tracebacks...]
    File "C:\Python26\lib\site-packages\mercurial\url.py", line 131, in find_user_password
      raise util.Abort(_('http authorization required'))
  mercurial.error.Abort: http authorization required
  </code></pre>
  
  <p>How can I pass my username and password to the <code>hg.repository</code> function? I've looked at both the source to hg.py and ui.py, but neither were helpful.</p>