1. mackstann
  2. blatter

Commits

Nick Welch  committed ff47576

Use the rsync -c (--checksum) option. This is useful because the act of
blatting wipes out last-modified times, making the usual rsync algorithm
worthless. With -c, only the files whose contents actually changed will be
copied.

  • Participants
  • Parent commits f8a0116
  • Branches default

Comments (0)

Files changed (1)

File blatter/__init__.py

View file
  • Ignore whitespace
                                   config.url_prefix.lstrip('/'))
     if not os.path.exists(target):
         os.makedirs(target)
-    args = ['rsync', '-rv', source, target]
+    args = ['rsync', '-crv', source, target]
     rsync = subprocess.Popen(args, stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
     res = rsync.wait()
                "or use --destination")
         sys.exit(1)
 
-    args = ['rsync', '-rv', source, destination]
+    args = ['rsync', '-crv', source, destination]
     if verbose:
         print ' '.join(args)
     return subprocess.Popen(args).wait()