comparison mercurial/exchange.py @ 37084:f0b6fbea00cf

stringutil: bulk-replace call sites to point to new module This might conflict with other patches floating around, sorry.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 22 Mar 2018 21:56:20 +0900
parents c0e90df1ab1e
children b229fd9adeae
comparison
equal deleted inserted replaced
37083:f99d64e8a4e4 37084:f0b6fbea00cf
32 scmutil, 32 scmutil,
33 sslutil, 33 sslutil,
34 streamclone, 34 streamclone,
35 url as urlmod, 35 url as urlmod,
36 util, 36 util,
37 )
38 from .utils import (
39 stringutil,
37 ) 40 )
38 41
39 urlerr = util.urlerr 42 urlerr = util.urlerr
40 urlreq = util.urlreq 43 urlreq = util.urlreq
41 44
2178 repo.ui.debug(str(e) + '\n') 2181 repo.ui.debug(str(e) + '\n')
2179 continue 2182 continue
2180 except error.UnsupportedBundleSpecification as e: 2183 except error.UnsupportedBundleSpecification as e:
2181 repo.ui.debug('filtering %s because unsupported bundle ' 2184 repo.ui.debug('filtering %s because unsupported bundle '
2182 'spec: %s\n' % ( 2185 'spec: %s\n' % (
2183 entry['URL'], util.forcebytestr(e))) 2186 entry['URL'], stringutil.forcebytestr(e)))
2184 continue 2187 continue
2185 # If we don't have a spec and requested a stream clone, we don't know 2188 # If we don't have a spec and requested a stream clone, we don't know
2186 # what the entry is so don't attempt to apply it. 2189 # what the entry is so don't attempt to apply it.
2187 elif streamclonerequested: 2190 elif streamclonerequested:
2188 repo.ui.debug('filtering %s because cannot determine if a stream ' 2191 repo.ui.debug('filtering %s because cannot determine if a stream '
2284 else: 2287 else:
2285 bundle2.applybundle(repo, cg, tr, 'clonebundles', url) 2288 bundle2.applybundle(repo, cg, tr, 'clonebundles', url)
2286 return True 2289 return True
2287 except urlerr.httperror as e: 2290 except urlerr.httperror as e:
2288 ui.warn(_('HTTP error fetching bundle: %s\n') % 2291 ui.warn(_('HTTP error fetching bundle: %s\n') %
2289 util.forcebytestr(e)) 2292 stringutil.forcebytestr(e))
2290 except urlerr.urlerror as e: 2293 except urlerr.urlerror as e:
2291 ui.warn(_('error fetching bundle: %s\n') % 2294 ui.warn(_('error fetching bundle: %s\n') %
2292 util.forcebytestr(e.reason)) 2295 stringutil.forcebytestr(e.reason))
2293 2296
2294 return False 2297 return False