[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

hot-backup.py patch

From: Michael Price <mprice_at_atl.lmco.com>
Date: 2002-11-20 17:48:26 CET

Index: hot-backup.py
===================================================================
--- hot-backup.py (revision 3840)
+++ hot-backup.py (working copy)
@@ -22,7 +22,7 @@
 
 ######################################################################
 
-import sys, os, shutil, string
+import sys, os, os.path, shutil, string
 
 ######################################################################
 # Global Settings
@@ -78,6 +78,9 @@
 
 backup_subdir = os.path.join(backup_dir, repo + "-" + youngest)
 print "Backing up repository to '" + backup_subdir + "'..."
+if os.path.isdir(backup_subdir):
+ print "Backup of revision %s already exists." % backup_subdir,
+ sys.exit(0)
 shutil.copytree(repo_dir, backup_subdir)
 print "Done."
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 20 17:51:12 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.