--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -42,7 +42,7 @@ class appender:
def flush(self):
pass
def close(self):
- close(self.fp)
+ self.fp.close()
def seek(self, offset, whence=0):
'''virtual file offset spans real file and data'''
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -316,7 +316,7 @@ def dispatch(ui, args, argv0=None):
util._fallbackencoding = fallback
fullargs = args
- cmd, func, args, options, cmdoptions = parse(ui, args)
+ cmd, func, args, options, cmdoptions = parse(lui, args)
if options["config"]:
raise util.Abort(_("Option --config may not be abbreviated!"))