Example #1
0
cacheNew.log("[%s] initialized" % (os.path.basename(__file__)))


logging.info("moved files:")
for paths in cmpr.getMovedFiles():
    logging.info("    ren %s --> %s" % (paths[1], paths[0]))

    if doApply:
        np = Path.Path(paths[0], False)
        np.size = paths[2]

        op = Path.Path(paths[1], False)
        op.size = paths[3]

        cmpr.moveFile(op, np)
        wrt.moveFile(op, np)
        # print "    ...marked & written"
cmpr.commit()
wrt.commit()


logging.info("deleted files:")
# TODO: do some sort of backups
for paths in cmpr.getDeletedFiles():
    if args["verbose"] >= 4:
        logging.info("    del %s" % (paths[0]))

    if doApply:
        op = Path.Path(paths[0], False)
        op.size = paths[1]
Example #2
0
    cacheNew.setFlag('destination.cache.path', args['cacheOld'])
    cacheNew.setFlag('destination.path', args['destination'])
    cacheNew.setFlag('destinationBackup.path', args['destinationBackup'])

logging.info("moved files:")
for paths in cmpr.getMovedFiles():
    logging.info("    ren %s --> %s" % (paths[1], paths[0]))

    if doApply:
        np = Path.Path(paths[0], False)
        np.size = paths[2]

        op = Path.Path(paths[1], False)
        op.size = paths[3]

        retry_calls(lambda: cmpr.moveFile(op, np), onError_default)
        retry_calls(lambda: wrt.moveFile(op, np), onError_default)

        #print "    ...marked & written"
cmpr.commit()
wrt.commit()

logging.info("deleted files:")
# TODO: do some sort of backups
for paths in cmpr.getDeletedFiles():
    if args['verbose'] >= 4:
        logging.info("    del %s" % (paths[0]))

    if doApply:
        op = Path.Path(paths[0], False)
        op.size = paths[1]