Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/remotestore.py @ 37087: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 | 247e9bf4ecdc |
children | 2372284d9457 |
line wrap: on
line diff
--- a/hgext/largefiles/remotestore.py Thu Mar 22 21:19:31 2018 +0900 +++ b/hgext/largefiles/remotestore.py Thu Mar 22 21:56:20 2018 +0900 @@ -14,6 +14,10 @@ util, ) +from mercurial.utils import ( + stringutil, +) + from . import ( basestore, lfutil, @@ -52,7 +56,7 @@ except IOError as e: raise error.Abort( _('remotestore: could not open file %s: %s') - % (filename, util.forcebytestr(e))) + % (filename, stringutil.forcebytestr(e))) def _getfile(self, tmpfile, filename, hash): try: @@ -61,7 +65,7 @@ # 401s get converted to error.Aborts; everything else is fine being # turned into a StoreError raise basestore.StoreError(filename, hash, self.url, - util.forcebytestr(e)) + stringutil.forcebytestr(e)) except urlerr.urlerror as e: # This usually indicates a connection problem, so don't # keep trying with the other files... they will probably @@ -70,7 +74,7 @@ (util.hidepassword(self.url), e.reason)) except IOError as e: raise basestore.StoreError(filename, hash, self.url, - util.forcebytestr(e)) + stringutil.forcebytestr(e)) return lfutil.copyandhash(chunks, tmpfile)