changeset 3933:7997c0e01bfc

hg in: if no incoming csets, remove existing bundle
author Matt Mackall <mpm@selenic.com>
date Tue, 19 Dec 2006 16:37:45 -0600
parents e0793314360e
children d0bbd8ee50c7
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Dec 19 08:59:41 2006 -0600
+++ b/mercurial/commands.py	Tue Dec 19 16:37:45 2006 -0600
@@ -1531,6 +1531,10 @@
     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