eol: fix 'error' parameter name in the commitctx wrapper stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 23 Jun 2017 13:22:04 +0200
branchstable
changeset 32988 4e7352b8325c
parent 32987 74930cf4a10e
child 33004 c808862f2e6e
child 33023 e02bae37af30
eol: fix 'error' parameter name in the commitctx wrapper Since its introduction in 9dfee83c93c8, the parameter has always been name "error". Yet the eol extension have been using 'haserror' as the argument name, breaking extensions with subclass passing 'error' as a keyword argument.
hgext/eol.py
--- a/hgext/eol.py	Fri Jun 23 13:24:45 2017 +0200
+++ b/hgext/eol.py	Fri Jun 23 13:22:04 2017 +0200
@@ -367,7 +367,7 @@
                     if wlock is not None:
                         wlock.release()
 
-        def commitctx(self, ctx, haserror=False):
+        def commitctx(self, ctx, error=False):
             for f in sorted(ctx.added() + ctx.modified()):
                 if not self._eolmatch(f):
                     continue
@@ -383,6 +383,6 @@
                 if inconsistenteol(data):
                     raise errormod.Abort(_("inconsistent newline style "
                                            "in %s\n") % f)
-            return super(eolrepo, self).commitctx(ctx, haserror)
+            return super(eolrepo, self).commitctx(ctx, error)
     repo.__class__ = eolrepo
     repo._hgcleardirstate()