--- a/hgext/automv.py Sun Oct 06 09:45:02 2019 -0400
+++ b/hgext/automv.py Sun Oct 06 09:48:39 2019 -0400
@@ -42,14 +42,14 @@
configitem = registrar.configitem(configtable)
configitem(
- 'automv', 'similarity', default=95,
+ b'automv', b'similarity', default=95,
)
def extsetup(ui):
- entry = extensions.wrapcommand(commands.table, 'commit', mvcheck)
+ entry = extensions.wrapcommand(commands.table, b'commit', mvcheck)
entry[1].append(
- ('', 'no-automv', None, _('disable automatic file move detection'))
+ (b'', b'no-automv', None, _(b'disable automatic file move detection'))
)
@@ -57,11 +57,11 @@
"""Hook to check for moves at commit time"""
opts = pycompat.byteskwargs(opts)
renames = None
- disabled = opts.pop('no_automv', False)
+ disabled = opts.pop(b'no_automv', False)
if not disabled:
- threshold = ui.configint('automv', 'similarity')
+ threshold = ui.configint(b'automv', b'similarity')
if not 0 <= threshold <= 100:
- raise error.Abort(_('automv.similarity must be between 0 and 100'))
+ raise error.Abort(_(b'automv.similarity must be between 0 and 100'))
if threshold > 0:
match = scmutil.match(repo[None], pats, opts)
added, removed = _interestingfiles(repo, match)
@@ -87,7 +87,7 @@
added = stat.added
removed = stat.removed
- copy = copies.pathcopies(repo['.'], repo[None], matcher)
+ copy = copies.pathcopies(repo[b'.'], repo[None], matcher)
# remove the copy files for which we already have copy info
added = [f for f in added if f not in copy]
@@ -108,10 +108,10 @@
):
if repo.ui.verbose:
repo.ui.status(
- _('detected move of %s as %s (%d%% similar)\n')
+ _(b'detected move of %s as %s (%d%% similar)\n')
% (uipathfn(src), uipathfn(dst), score * 100)
)
renames[dst] = src
if renames:
- repo.ui.status(_('detected move of %d files\n') % len(renames))
+ repo.ui.status(_(b'detected move of %d files\n') % len(renames))
return renames