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

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

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

revision 1.27 by bescoto, Sun Mar 2 07:09:05 2003 UTC revision 1.28 by bescoto, Wed Mar 5 00:22:20 2003 UTC
# Line 19  Line 19 
19    
20  """Provides functions and *ITR classes, for writing increment files"""  """Provides functions and *ITR classes, for writing increment files"""
21    
22  import Globals, Time, rpath, Rdiff, log, statistics  import Globals, Time, rpath, Rdiff, log, statistics, robust
23    
24    
25  def Increment(new, mirror, incpref):  def Increment(new, mirror, incpref):
# Line 59  def iscompressed(mirror): Line 59  def iscompressed(mirror):
59  def makesnapshot(mirror, incpref):  def makesnapshot(mirror, incpref):
60          """Copy mirror to incfile, since new is quite different"""          """Copy mirror to incfile, since new is quite different"""
61          compress = iscompressed(mirror)          compress = iscompressed(mirror)
62          if compress: snapshotrp = get_inc(incpref, "snapshot.gz")          if compress and mirror.isreg():
63                    snapshotrp = get_inc(incpref, "snapshot.gz")
64          else: snapshotrp = get_inc(incpref, "snapshot")          else: snapshotrp = get_inc(incpref, "snapshot")
65          rpath.copy_with_attribs(mirror, snapshotrp, compress)  
66            if mirror.isspecial(): # check for errors when creating special increments
67                    eh = robust.get_error_handler("SpecialFileError")
68                    if robust.check_common_error(eh, rpath.copy_with_attribs,
69                                                                             (mirror, snapshotrp, compress)) == 0:
70                            snapshotrp.setdata()
71                            if snapshotrp.lstat(): snapshotrp.delete()
72                            snapshotrp.touch()
73            else: rpath.copy_with_attribs(mirror, snapshotrp, compress)
74          return snapshotrp          return snapshotrp
75    
76  def makediff(new, mirror, incpref):  def makediff(new, mirror, incpref):

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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