Commits

Peter Ruibal committed 31046bd

history: export should prompt for overwrites and re-create files

  • Participants
  • Parent commits 740ec4c

Comments (0)

Files changed (2)

                     , gtk.RESPONSE_CANCEL
                     , gtk.STOCK_SAVE
                     , gtk.RESPONSE_OK))
+        file_save.set_do_overwrite_confirmation(True)
         file_save.set_default_response(gtk.RESPONSE_OK)
         file_save.set_current_folder(self.InitialDir)
         file_save.set_current_name(self.FileName)
         result = fd.run()
 
         if result:
+            if os.path.exists(result):
+                os.remove(result)
+            
             # In case new export args are added in the future, merge the
             # hg defaults
             exportOpts= self.merge_opts(commands.table['^export'][1], ())