Mercurial > public > mercurial-scm > hg-stable
diff mercurial/branchmap.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 | 95f4f1bfb650 |
children | 2a4bfbb52111 |
line wrap: on
line diff
--- a/mercurial/branchmap.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/branchmap.py Thu Mar 22 21:56:20 2018 +0900 @@ -22,6 +22,9 @@ scmutil, util, ) +from .utils import ( + stringutil, +) calcsize = struct.calcsize pack_into = struct.pack_into @@ -256,7 +259,7 @@ except (IOError, OSError, error.Abort) as inst: # Abort may be raised by read only opener, so log and continue repo.ui.debug("couldn't write branch cache: %s\n" % - util.forcebytestr(inst)) + stringutil.forcebytestr(inst)) def update(self, repo, revgen): """Given a branchhead cache, self, that may have extra nodes or be @@ -378,7 +381,7 @@ self._rbcrevs[:] = data except (IOError, OSError) as inst: repo.ui.debug("couldn't read revision branch cache: %s\n" % - util.forcebytestr(inst)) + stringutil.forcebytestr(inst)) # remember number of good records on disk self._rbcrevslen = min(len(self._rbcrevs) // _rbcrecsize, len(repo.changelog)) @@ -540,7 +543,7 @@ self._rbcrevslen = revs except (IOError, OSError, error.Abort, error.LockError) as inst: repo.ui.debug("couldn't write revision branch cache%s: %s\n" - % (step, util.forcebytestr(inst))) + % (step, stringutil.forcebytestr(inst))) finally: if wlock is not None: wlock.release()