"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/findPath.py" between
Tardis-1.1.5.tar.gz and Tardis-1.2.1.tar.gz

About: Tardis is a system for making encrypted, incremental backups of filesystems.

findPath.py  (Tardis-1.1.5):findPath.py  (Tardis-1.2.1)
skipping to change at line 61 skipping to change at line 61
except EOFError: except EOFError:
return return
def processArgs(): def processArgs():
parser = argparse.ArgumentParser(description='Extract paths for a changeset' , fromfile_prefix_chars='@', add_help=False) parser = argparse.ArgumentParser(description='Extract paths for a changeset' , fromfile_prefix_chars='@', add_help=False)
(_, remaining) = Config.parseConfigOptions(parser) (_, remaining) = Config.parseConfigOptions(parser)
Config.addCommonOptions(parser) Config.addCommonOptions(parser)
Config.addPasswordOptions(parser) Config.addPasswordOptions(parser)
parser.add_argument('--encrypt', '-e', dest='encrypt', default=False, action ='store_true', help='Encrypt names instead of decrypting')
parser.add_argument('--quiet', '-q', dest='quiet', default=False, action='st ore_true', help="Only print the translation, not the input strings") parser.add_argument('--quiet', '-q', dest='quiet', default=False, action='st ore_true', help="Only print the translation, not the input strings")
parser.add_argument('--backup', '-b', dest='backup', default=None, help='Loo k in specific backupset') parser.add_argument('--backup', '-b', dest='backup', default=None, help='Loo k in specific backupset')
parser.add_argument('--chain', '-c', dest='chain', default=False, action='st ore_true', help="Print file info on all stages in the chain")
parser.add_argument('--help', '-h', action='help'); parser.add_argument('--help', '-h', action='help');
parser.add_argument('checksums', nargs='*', help="List of checksums to extract") parser.add_argument('checksums', nargs='*', help="List of checksums to extract")
Util.addGenCompletions(parser) Util.addGenCompletions(parser)
args = parser.parse_args(remaining) args = parser.parse_args(remaining)
return args return args
skipping to change at line 134 skipping to change at line 134
for i in data: for i in data:
try: try:
for finfo in tardis.getFileInfoByChecksum(i, bset): for finfo in tardis.getFileInfoByChecksum(i, bset):
inode = (finfo['inode'], finfo['device']) inode = (finfo['inode'], finfo['device'])
if inode == prevInode: if inode == prevInode:
next next
prevInode = inode prevInode = inode
if args.quiet: if args.quiet:
print(_path(tardis, crypto, bset, inode)) print(_path(tardis, crypto, bset, inode))
else: else:
print(f"{i} => {_path(tardis, crypto, bset, inode)}") print(f"{i} => [{finfo['firstset']}, {finfo['lastset']}] ({f
info['inode']}, {finfo['device']})\t{_path(tardis, crypto, bset, inode)}")
if args.chain:
info = tardis.getChecksumInfoChain(i)
x = 0
for j in info:
print(f" {x:2}: {j['checksum']} Size: {j['size']:8} File: {
bool(j['isfile'])} Compressed: {j['compressed']} Encrypted: {bool(j['encrypted']
)} DiskSize: {j['disksize']}")
x += 1
print("")
except Exception as e: except Exception as e:
print("Caught exception: " + str(e)) print("Caught exception: " + str(e))
if __name__ == "__main__": if __name__ == "__main__":
main() main()
 End of changes. 3 change blocks. 
2 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)