Mercurial > hg
comparison hgext/relink.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 | 9e2866065982 |
children | 398716063c2d |
comparison
equal
deleted
inserted
replaced
37083:f99d64e8a4e4 | 37084:f0b6fbea00cf |
---|---|
15 from mercurial import ( | 15 from mercurial import ( |
16 error, | 16 error, |
17 hg, | 17 hg, |
18 registrar, | 18 registrar, |
19 util, | 19 util, |
20 ) | |
21 from mercurial.utils import ( | |
22 stringutil, | |
20 ) | 23 ) |
21 | 24 |
22 cmdtable = {} | 25 cmdtable = {} |
23 command = registrar.command(cmdtable) | 26 command = registrar.command(cmdtable) |
24 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | 27 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
185 relinkfile(source, tgt) | 188 relinkfile(source, tgt) |
186 ui.progress(_('relinking'), pos, f, _('files'), total) | 189 ui.progress(_('relinking'), pos, f, _('files'), total) |
187 relinked += 1 | 190 relinked += 1 |
188 savedbytes += sz | 191 savedbytes += sz |
189 except OSError as inst: | 192 except OSError as inst: |
190 ui.warn('%s: %s\n' % (tgt, util.forcebytestr(inst))) | 193 ui.warn('%s: %s\n' % (tgt, stringutil.forcebytestr(inst))) |
191 | 194 |
192 ui.progress(_('relinking'), None) | 195 ui.progress(_('relinking'), None) |
193 | 196 |
194 ui.status(_('relinked %d files (%s reclaimed)\n') % | 197 ui.status(_('relinked %d files (%s reclaimed)\n') % |
195 (relinked, util.bytecount(savedbytes))) | 198 (relinked, util.bytecount(savedbytes))) |