diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1811,6 +1811,7 @@ def incoming(ui, repo, source="default", ui.write("\n") if cleanup: + os.close(fd) os.unlink(cleanup) def init(ui, dest="."):