mercurial/commands.py
changeset 1970 119165543ce6
parent 1969 6d17d420c46c
child 1971 915b81a35e46
--- 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="."):