py3: handle keyword arguments in hgext/automv.py

Differential Revision: https://phab.mercurial-scm.org/D1296
This commit is contained in:
Pulkit Goyal 2017-10-22 23:52:22 +05:30
parent d47e0831af
commit 6b74a599aa

View File

@ -32,6 +32,7 @@ from mercurial import (
copies,
error,
extensions,
pycompat,
registrar,
scmutil,
similar
@ -53,6 +54,7 @@ def extsetup(ui):
def mvcheck(orig, ui, repo, *pats, **opts):
"""Hook to check for moves at commit time"""
opts = pycompat.byteskwargs(opts)
renames = None
disabled = opts.pop('no_automv', False)
if not disabled:
@ -68,7 +70,7 @@ def mvcheck(orig, ui, repo, *pats, **opts):
with repo.wlock():
if renames is not None:
scmutil._markchanges(repo, (), (), renames)
return orig(ui, repo, *pats, **opts)
return orig(ui, repo, *pats, **pycompat.strkwargs(opts))
def _interestingfiles(repo, matcher):
"""Find what files were added or removed in this commit.