Mercurial > hg
diff hgext/fetch.py @ 46907:ffd3e823a7e5
urlutil: extract `url` related code from `util` into the new module
The new module is well fitting for this new code. And this will be useful to
make the gathered code collaborate more later.
Differential Revision: https://phab.mercurial-scm.org/D10374
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 12 Apr 2021 03:01:04 +0200 |
parents | 89a2afe31e82 |
children | b133154f1e7b |
line wrap: on
line diff
--- a/hgext/fetch.py Sun Apr 11 23:54:35 2021 +0200 +++ b/hgext/fetch.py Mon Apr 12 03:01:04 2021 +0200 @@ -19,9 +19,11 @@ lock, pycompat, registrar, - util, ) -from mercurial.utils import dateutil +from mercurial.utils import ( + dateutil, + urlutil, +) release = lock.release cmdtable = {} @@ -109,7 +111,8 @@ other = hg.peer(repo, opts, ui.expandpath(source)) ui.status( - _(b'pulling from %s\n') % util.hidepassword(ui.expandpath(source)) + _(b'pulling from %s\n') + % urlutil.hidepassword(ui.expandpath(source)) ) revs = None if opts[b'rev']: @@ -180,7 +183,7 @@ if not err: # we don't translate commit messages message = cmdutil.logmessage(ui, opts) or ( - b'Automated merge with %s' % util.removeauth(other.url()) + b'Automated merge with %s' % urlutil.removeauth(other.url()) ) editopt = opts.get(b'edit') or opts.get(b'force_editor') editor = cmdutil.getcommiteditor(edit=editopt, editform=b'fetch')