Mercurial > hg
comparison hgext/eol.py @ 32988:4e7352b8325c stable
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Jun 2017 13:22:04 +0200 |
parents | 74930cf4a10e |
children | 0f685a229a81 |
comparison
equal
deleted
inserted
replaced
32987:74930cf4a10e | 32988:4e7352b8325c |
---|---|
365 pass | 365 pass |
366 finally: | 366 finally: |
367 if wlock is not None: | 367 if wlock is not None: |
368 wlock.release() | 368 wlock.release() |
369 | 369 |
370 def commitctx(self, ctx, haserror=False): | 370 def commitctx(self, ctx, error=False): |
371 for f in sorted(ctx.added() + ctx.modified()): | 371 for f in sorted(ctx.added() + ctx.modified()): |
372 if not self._eolmatch(f): | 372 if not self._eolmatch(f): |
373 continue | 373 continue |
374 fctx = ctx[f] | 374 fctx = ctx[f] |
375 if fctx is None: | 375 if fctx is None: |
381 # have all non-binary files taken care of. | 381 # have all non-binary files taken care of. |
382 continue | 382 continue |
383 if inconsistenteol(data): | 383 if inconsistenteol(data): |
384 raise errormod.Abort(_("inconsistent newline style " | 384 raise errormod.Abort(_("inconsistent newline style " |
385 "in %s\n") % f) | 385 "in %s\n") % f) |
386 return super(eolrepo, self).commitctx(ctx, haserror) | 386 return super(eolrepo, self).commitctx(ctx, error) |
387 repo.__class__ = eolrepo | 387 repo.__class__ = eolrepo |
388 repo._hgcleardirstate() | 388 repo._hgcleardirstate() |