comparison hgext/histedit.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 11ce2977572f
children 4452cb788404
comparison
equal deleted inserted replaced
46906:33524c46a092 46907:ffd3e823a7e5
240 util, 240 util,
241 ) 241 )
242 from mercurial.utils import ( 242 from mercurial.utils import (
243 dateutil, 243 dateutil,
244 stringutil, 244 stringutil,
245 urlutil,
245 ) 246 )
246 247
247 pickle = util.pickle 248 pickle = util.pickle
248 cmdtable = {} 249 cmdtable = {}
249 command = registrar.command(cmdtable) 250 command = registrar.command(cmdtable)
1040 Used by initialization code""" 1041 Used by initialization code"""
1041 if opts is None: 1042 if opts is None:
1042 opts = {} 1043 opts = {}
1043 dest = ui.expandpath(remote or b'default-push', remote or b'default') 1044 dest = ui.expandpath(remote or b'default-push', remote or b'default')
1044 dest, branches = hg.parseurl(dest, None)[:2] 1045 dest, branches = hg.parseurl(dest, None)[:2]
1045 ui.status(_(b'comparing with %s\n') % util.hidepassword(dest)) 1046 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
1046 1047
1047 revs, checkout = hg.addbranchrevs(repo, repo, branches, None) 1048 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
1048 other = hg.peer(repo, opts, dest) 1049 other = hg.peer(repo, opts, dest)
1049 1050
1050 if revs: 1051 if revs: