# HG changeset patch
# User Giampaolo Fadel <[email protected]>
# Date 1245412068 -7200
# Node ID 870c22af24f7f89ba15117b5960331035e72ad43
# Parent  ee88384b8e24a6e31f90cd0c0882b79367331810
history: ask to overwrite an existing bundle file

diff --git a/hggtk/history.py b/hggtk/history.py
--- a/hggtk/history.py
+++ b/hggtk/history.py
@@ -692,6 +692,14 @@
                                          InitialDir=self.repo.root,
                                          FileName=filename).run()
         if result:
+            if os.path.exists(result):
+                res = gdialog.Confirm(_('Confirm Overwrite'), [], self,
+                   _('The file "%s" already exists!\n\n'
+                     'Do you want to overwrite it?') % result).run()
+                if res != gtk.RESPONSE_YES:
+                    return
+                os.remove(result)
+        
             cmdline = ['hg', 'bundle', '--base', str(parent), result]
             dlg = hgcmd.CmdDialog(cmdline)
             dlg.show_all()

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to