Mercurial > hg > mercurial-source
diff hgext/fetch.py @ 7270:2db33c1a5654
factor out the url handling from httprepo
Create url.py to handle all the url handling:
- proxy handling
- workaround various python bugs
- handle username/password embedded in the url
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 27 Oct 2008 21:50:01 +0100 |
parents | 6489ee64b522 |
children | 26adfaccdf73 |
line wrap: on
line diff
--- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -8,7 +8,7 @@ from mercurial.i18n import _ from mercurial.node import nullid, short -from mercurial import commands, cmdutil, hg, util +from mercurial import commands, cmdutil, hg, util, url def fetch(ui, repo, source='default', **opts): '''Pull changes from a remote repository, merge new changes if needed. @@ -60,7 +60,7 @@ other = hg.repository(ui, ui.expandpath(source)) ui.status(_('pulling from %s\n') % - util.hidepassword(ui.expandpath(source))) + url.hidepassword(ui.expandpath(source))) revs = None if opts['rev']: if not other.local(): @@ -118,7 +118,7 @@ mod, add, rem = repo.status()[:3] message = (cmdutil.logmessage(opts) or (_('Automated merge with %s') % - util.removeauth(other.url()))) + url.removeauth(other.url()))) force_editor = opts.get('force_editor') or opts.get('edit') n = repo.commit(mod + add + rem, message, opts['user'], opts['date'], force=True,