Example #1
0
}


for paths in cmpr.getMovedFiles():
    logging.debug("    ren %s --> %s" % (paths[1], paths[0]))
    stats["sizes"]["getMovedFiles"] += paths[2]
    stats["count"]["getMovedFiles"] += 1


for paths in cmpr.getDeletedFiles():
    logging.debug("    del %s" % (paths[0]))
    stats["sizes"]["getDeletedFiles"] += paths[1]
    stats["count"]["getDeletedFiles"] += 1


for paths in cmpr.getChangedFiles():
    logging.debug("    upd %s --> %s" % (paths[1], paths[0]))
    stats["sizes"]["getChangedFiles"] += paths[2]
    stats["count"]["getChangedFiles"] += 1


for paths in cmpr.getNewFiles():
    logging.debug("    cpy %s" % (paths[0],))
    stats["sizes"]["getNewFiles"] += paths[1]
    stats["count"]["getNewFiles"] += 1


print(
    "getChangedFiles : %d files, %s"
    % (stats["count"]["getChangedFiles"], humanize.naturalsize(stats["sizes"]["getChangedFiles"]))
)
Example #2
0
        'getChangedFiles': 0,
        'getNewFiles': 0,
    },
}

for paths in cmpr.getMovedFiles():
    logging.debug("    ren %s --> %s" % (paths[1], paths[0]))
    stats['sizes']['getMovedFiles'] += paths[2]
    stats['count']['getMovedFiles'] += 1

for paths in cmpr.getDeletedFiles():
    logging.debug("    del %s" % (paths[0]))
    stats['sizes']['getDeletedFiles'] += paths[1]
    stats['count']['getDeletedFiles'] += 1

for paths in cmpr.getChangedFiles():
    logging.debug("    upd %s --> %s" % (
        paths[1],
        paths[0],
    ))
    stats['sizes']['getChangedFiles'] += paths[2]
    stats['count']['getChangedFiles'] += 1

for paths in cmpr.getNewFiles():
    logging.debug("    cpy %s" % (paths[0], ))
    stats['sizes']['getNewFiles'] += paths[1]
    stats['count']['getNewFiles'] += 1

print("getChangedFiles : %d files, %s" %
      (stats['count']['getChangedFiles'],
       humanize.naturalsize(stats['sizes']['getChangedFiles'])))