/[rdiff-backup]/rdiff-backup/rdiff_backup/Main.py
ViewVC logotype

Diff of /rdiff-backup/rdiff_backup/Main.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.82 by bescoto, Mon Apr 4 06:14:35 2005 UTC revision 1.83 by bescoto, Mon Aug 8 03:53:50 2005 UTC
# Line 28  import Globals, Time, SetConnections, se Line 28  import Globals, Time, SetConnections, se
28    
29    
30  action = None  action = None
31    create_full_path = None
32  remote_cmd, remote_schema = None, None  remote_cmd, remote_schema = None, None
33  force = None  force = None
34  select_opts = []  select_opts = []
# Line 40  return_val = None # Set to cause exit co Line 41  return_val = None # Set to cause exit co
41    
42  def parse_cmdlineoptions(arglist):  def parse_cmdlineoptions(arglist):
43          """Parse argument list and set global preferences"""          """Parse argument list and set global preferences"""
44          global args, action, force, restore_timestr, remote_cmd, remote_schema          global args, action, create_full_path, force, restore_timestr, remote_cmd
45          global remove_older_than_string          global remote_schema, remove_older_than_string
46          global user_mapping_filename, group_mapping_filename          global user_mapping_filename, group_mapping_filename
47          def sel_fl(filename):          def sel_fl(filename):
48                  """Helper function for including/excluding filelists below"""                  """Helper function for including/excluding filelists below"""
# Line 54  def parse_cmdlineoptions(arglist): Line 55  def parse_cmdlineoptions(arglist):
55    
56          try: optlist, args = getopt.getopt(arglist, "blr:sv:V",          try: optlist, args = getopt.getopt(arglist, "blr:sv:V",
57                   ["backup-mode", "calculate-average", "check-destination-dir",                   ["backup-mode", "calculate-average", "check-destination-dir",
58                    "compare", "compare-at-time=", "current-time=", "exclude=",                    "compare", "compare-at-time=", "create-full-path",
59                    "exclude-device-files", "exclude-fifos",                    "current-time=", "exclude=", "exclude-device-files",
60                    "exclude-filelist=", "exclude-symbolic-links",                    "exclude-fifos", "exclude-filelist=",
61                    "exclude-sockets", "exclude-filelist-stdin",                    "exclude-symbolic-links", "exclude-sockets",
62                    "exclude-globbing-filelist=",                    "exclude-filelist-stdin", "exclude-globbing-filelist=",
63                    "exclude-globbing-filelist-stdin", "exclude-mirror=",                    "exclude-globbing-filelist-stdin", "exclude-mirror=",
64                    "exclude-other-filesystems", "exclude-regexp=",                    "exclude-other-filesystems", "exclude-regexp=",
65                    "exclude-special-files", "force", "group-mapping-file=",                    "exclude-special-files", "force", "group-mapping-file=",
# Line 88  def parse_cmdlineoptions(arglist): Line 89  def parse_cmdlineoptions(arglist):
89                          action = "compare"                          action = "compare"
90                          if opt == "--compare": restore_timestr = "now"                          if opt == "--compare": restore_timestr = "now"
91                          else: restore_timestr = arg                          else: restore_timestr = arg
92                    elif opt == "--create-full-path": create_full_path = 1
93                  elif opt == "--current-time":                  elif opt == "--current-time":
94                          Globals.set_integer('current_time', arg)                          Globals.set_integer('current_time', arg)
95                  elif (opt == "--exclude" or                  elif (opt == "--exclude" or
# Line 325  def backup_check_dirs(rpin, rpout): Line 327  def backup_check_dirs(rpin, rpout):
327                          Log("Deleting %s" % rpout.path, 3)                          Log("Deleting %s" % rpout.path, 3)
328                          rpout.delete()                          rpout.delete()
329          if not rpout.lstat():          if not rpout.lstat():
330                  try: rpout.mkdir()                  try:
331                            if create_full_path: rpout.makedirs()
332                            else: rpout.mkdir()
333                  except os.error:                  except os.error:
334                          Log.FatalError("Unable to create directory %s" % rpout.path)                          Log.FatalError("Unable to create directory %s" % rpout.path)
335    

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26