# HG changeset patch # User Dirkjan Ochtman # Date 1275982245 -7200 # Node ID d4cafcb63f778f8ab85d684877598d941211129c # Parent 8c377f2feee128f098c7db67db26679cf7f7c9a9 cleanups: undefined variables diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -29,7 +29,7 @@ sys.stderr.write(_("hg: parse error at %s: %s\n") % (inst.args[1], inst.args[0])) else: - sys.stderr.write(_("hg: parse error: %s\n") % ints.args[0]) + sys.stderr.write(_("hg: parse error: %s\n") % inst.args[0]) return -1 return _runcatch(u, args) diff --git a/mercurial/parser.py b/mercurial/parser.py --- a/mercurial/parser.py +++ b/mercurial/parser.py @@ -33,8 +33,8 @@ def _match(self, m): 'make sure the tokenizer matches an end condition' if self.current[0] != m: - raise error.ParseError("unexpected token: %s" % self.current[2], - pos) + raise error.ParseError("unexpected token: %s" % self.current[0], + self.current[2]) self._advance() def _parse(self, bind=0): token, value, pos = self._advance() diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -17,7 +17,7 @@ if isinstance(thing, str): yield thing elif not hasattr(thing, '__iter__'): - if i is not None: + if thing is not None: yield str(thing) else: for i in thing: