mercurial/commands.py
changeset 3940 7997c0e01bfc
parent 3931 f2cbcf1e98b2
child 3950 3d3007064a17
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1531,6 +1531,10 @@ def incoming(ui, repo, source="default",
     other = hg.repository(ui, source)
     incoming = repo.findincoming(other, force=opts["force"])
     if not incoming:
+        try:
+            os.unlink(opts["bundle"])
+        except:
+            pass
         ui.status(_("no changes found\n"))
         return 1