rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/Main.py


From: Ben Escoto
Subject: [Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/Main.py
Date: Sun, 07 Aug 2005 23:53:52 -0400

Index: rdiff-backup/rdiff_backup/Main.py
diff -u rdiff-backup/rdiff_backup/Main.py:1.82 
rdiff-backup/rdiff_backup/Main.py:1.83
--- rdiff-backup/rdiff_backup/Main.py:1.82      Mon Apr  4 06:14:35 2005
+++ rdiff-backup/rdiff_backup/Main.py   Mon Aug  8 03:53:50 2005
@@ -28,6 +28,7 @@
 
 
 action = None
+create_full_path = None
 remote_cmd, remote_schema = None, None
 force = None
 select_opts = []
@@ -40,8 +41,8 @@
 
 def parse_cmdlineoptions(arglist):
        """Parse argument list and set global preferences"""
-       global args, action, force, restore_timestr, remote_cmd, remote_schema
-       global remove_older_than_string
+       global args, action, create_full_path, force, restore_timestr, 
remote_cmd
+       global remote_schema, remove_older_than_string
        global user_mapping_filename, group_mapping_filename
        def sel_fl(filename):
                """Helper function for including/excluding filelists below"""
@@ -54,11 +55,11 @@
 
        try: optlist, args = getopt.getopt(arglist, "blr:sv:V",
                 ["backup-mode", "calculate-average", "check-destination-dir",
-                 "compare", "compare-at-time=", "current-time=", "exclude=",
-                 "exclude-device-files", "exclude-fifos",
-                 "exclude-filelist=", "exclude-symbolic-links",
-                 "exclude-sockets", "exclude-filelist-stdin",
-                 "exclude-globbing-filelist=",
+                 "compare", "compare-at-time=", "create-full-path",
+                 "current-time=", "exclude=", "exclude-device-files",
+                 "exclude-fifos", "exclude-filelist=",
+                 "exclude-symbolic-links", "exclude-sockets",
+                 "exclude-filelist-stdin", "exclude-globbing-filelist=",
                  "exclude-globbing-filelist-stdin", "exclude-mirror=",
                  "exclude-other-filesystems", "exclude-regexp=",
                  "exclude-special-files", "force", "group-mapping-file=",
@@ -88,6 +89,7 @@
                        action = "compare"
                        if opt == "--compare": restore_timestr = "now"
                        else: restore_timestr = arg
+               elif opt == "--create-full-path": create_full_path = 1
                elif opt == "--current-time":
                        Globals.set_integer('current_time', arg)
                elif (opt == "--exclude" or
@@ -325,7 +327,9 @@
                        Log("Deleting %s" % rpout.path, 3)
                        rpout.delete()
        if not rpout.lstat():
-               try: rpout.mkdir()
+               try: 
+                       if create_full_path: rpout.makedirs()
+                       else: rpout.mkdir()
                except os.error:
                        Log.FatalError("Unable to create directory %s" % 
rpout.path)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]