duplicity-talk
[Top][All Lists]
Advanced

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

[Duplicity-talk] duplicity over rsync


From: Paul Arch
Subject: [Duplicity-talk] duplicity over rsync
Date: Thu, 14 Aug 2003 14:22:48 +0800

 
Hi,
 
 I am not a python programmer, so please excuse me if I am off track, but I think I found a problem using rsync as the transfer agent (0.4.1)
 I use rsync 2.5.6 under cygwin, to a backend rsync 2.5.6 under linux.
 
 In my case, in backends.py class rsync
 
 def list(self):
  """List files"""
  def split (str):
   line = str.split ()
   if len (line) > 4 and line[4] != '.':
    return line[4]
   else:
    return None
  commandline = "rsync %s" % self.url_string
  return filter (lambda x: x, map (split, self.popen(commandline).split('\n')))
 
doesnt work,
I have figured that actually my rsync listing must return different to whomever designed the patch :
 
 def list(self):
  """List files"""
  def split (str):
   line = str.split ()
   if len (line) > 3 and line[3] != '.':
    return line[3]
   else:
    return None
  commandline = "rsync %s" % self.url_string
  return filter (lambda x: x, map (split, self.popen(commandline).split('\n')))
 
 
It just depends on how rsync decides to list the files, I couldnt find out if you could tell rsync to list in a particular format or not ?
 
Anyhow, thought this might be useful to know, and maybe someone could suggest how to modify the split function - in python, is it possible to do a regexp ?? ;)
 
BTW, duplicity is excellent !! I have got it working under a fragmented cygwin system, and seems to work quite well .
 
cheers
 
 
Paul Arch
 

reply via email to

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