2.3 upgrade notes: remote repository API

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Sep 17 03:10:39 CDT 2012

I have some scripts at work that help make backups of Mercurial
repositories. I was using mercurial.hg.repository(ui, url) to get a
remote (HTTP, in this case) repository. In 2.3+, this is apparently no
longer allowed, but the alternative mercurial.hg.peer(uiorrepo, opts,
path) requires the additional opts (which seems to be a bit of a
kludge to help me pass in a dict with ssh/remotecmd configuration).
There's also a _peerorrepo() function in mercurial.hg that seems
attractive from where I sit, but is supposedly even more volatile than
the rest of the API, since it's underscore-prefixed. So:

- Perhaps add an UpgradeNote about this issue?
- Would it make sense to unprefix _peerorrepo() in 2.4?
- Some docstring about what opts should be would help.
- I shouldn't use hg.repository() but use this other API.



More information about the Mercurial-devel mailing list