"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Tardis/List.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.

List.py  (Tardis-1.1.5):List.py  (Tardis-1.2.1)
skipping to change at line 434 skipping to change at line 434
if args.versions == 'last': if args.versions == 'last':
printit(fInfos[lSet['backupset']], lSet['name'], colors['changed'], Fals e) printit(fInfos[lSet['backupset']], lSet['name'], colors['changed'], Fals e)
flushLine() flushLine()
def processFile(filename, fInfos, tardis, crypt, printContents=True, recurse=0, first=True, fmt='%s:', eol=True): def processFile(filename, fInfos, tardis, crypt, printContents=True, recurse=0, first=True, fmt='%s:', eol=True):
""" """
Collect information about a file, across all the backup sets Collect information about a file, across all the backup sets
Print a header for the file. Print a header for the file.
""" """
logger.debug("Processing file %s", filename)
# Count the number of non-null entries # Count the number of non-null entries
numFound = len([i for i in fInfos if fInfos[i] is not None]) numFound = len([i for i in fInfos if fInfos[i] is not None])
# Print the header # Print the header
if args.headers or (numFound == 0) or args.recent or not first: if args.headers or (numFound == 0) or args.recent or not first:
color = colors['header'] if first else colors['name'] color = colors['header'] if first else colors['name']
doprint(fmt % filename, color) doprint(fmt % filename, color)
if numFound == 0: if numFound == 0:
doprint(' Not found', colors['error']) doprint(' Not found', colors['error'])
if (numFound == 0) or args.versions != 'none' or eol: if (numFound == 0) or args.versions != 'none' or eol:
flushLine() flushLine()
if args.versions != 'none': if args.versions != 'none':
printVersions(fInfos) printVersions(fInfos)
# Figure out which versions of the file are directories # Figure out which versions of the file are directories
if printContents: if printContents:
# Create the list of directories
dirs = [(x, fInfos[x['backupset']]) for x in backupSets if fInfos[x['bac kupset']] and fInfos[x['backupset']]['dir'] == 1] dirs = [(x, fInfos[x['backupset']]) for x in backupSets if fInfos[x['bac kupset']] and fInfos[x['backupset']]['dir'] == 1]
if len(dirs): if len(dirs):
(contents, names) = collectDirContents2(tardis, dirs, crypt) (contents, names) = collectDirContents2(tardis, dirs, crypt)
if not args.hidden: if not args.hidden:
names = [n for n in names if not n.startswith('.')] names = [n for n in names if not n.startswith('.')]
(numCols, fmt) = computeColumnWidth(names) (numCols, fmt) = computeColumnWidth(names)
col = 0 col = 0
for name in sorted(names, key=lambda x: x.lower().lstrip('.'), rever se=args.reverse): for name in sorted(names, key=lambda x: x.lower().lstrip('.'), rever se=args.reverse):
fInfo = getInfoByName(contents, name) fInfo = getInfoByName(contents, name)
skipping to change at line 709 skipping to change at line 711
parser.add_argument('--deletions', dest='deletions', default=True, a ction=Util.StoreBoolean, help='Show deletions. Default: %(default)s') parser.add_argument('--deletions', dest='deletions', default=True, a ction=Util.StoreBoolean, help='Show deletions. Default: %(default)s')
parser.add_argument('--broken', dest='broken', default=True, a ction=Util.StoreBoolean, help='Show broken files (missing data). Default: %(d efault)s') parser.add_argument('--broken', dest='broken', default=True, a ction=Util.StoreBoolean, help='Show broken files (missing data). Default: %(d efault)s')
parser.add_argument('--oneline', '-O', dest='oneline', default=False, a ction=Util.StoreBoolean, help='Display versions on one line with the name. D efault: %(default)s') parser.add_argument('--oneline', '-O', dest='oneline', default=False, a ction=Util.StoreBoolean, help='Display versions on one line with the name. D efault: %(default)s')
parser.add_argument('--times', '-T', dest='checktimes', default=False, a ction=Util.StoreBoolean, help='Use file time changes when determining diffs. Default: %(default)s') parser.add_argument('--times', '-T', dest='checktimes', default=False, a ction=Util.StoreBoolean, help='Use file time changes when determining diffs. Default: %(default)s')
parser.add_argument('--metadata', '-M', dest='checkmeta', default=False, a ction=Util.StoreBoolean, help='Use any metadata changes when determining diff s. Default: %(default)s') parser.add_argument('--metadata', '-M', dest='checkmeta', default=False, a ction=Util.StoreBoolean, help='Use any metadata changes when determining diff s. Default: %(default)s')
parser.add_argument('--headers', dest='headers', default=True, a ction=Util.StoreBoolean, help='Show headers. Default: %(default)s') parser.add_argument('--headers', dest='headers', default=True, a ction=Util.StoreBoolean, help='Show headers. Default: %(default)s')
parser.add_argument('--colors', dest='colors', default=isatty, action=Util.StoreBoolean, help='Use colors. Default: %(default)s') parser.add_argument('--colors', dest='colors', default=isatty, action=Util.StoreBoolean, help='Use colors. Default: %(default)s')
parser.add_argument('--columns', dest='columns', type=int, defaul t=None , help='Number of columns to display') parser.add_argument('--columns', dest='columns', type=int, defaul t=None , help='Number of columns to display')
parser.add_argument('--recurse', '-R', dest='recurse', default=False, a ction='store_true', help='List Directories Recurively') parser.add_argument('--recurse', '-R', dest='recurse', default=False, a ction='store_true', help='List Directories Recurively')
parser.add_argument('--maxdepth', dest='maxdepth', default=sys.maxs parser.add_argument('--maxdepth', dest='maxdepth', default=sys.maxs
ize, type=int, help='Maximum depth to recurse directories') ize, type=int, help='Maximum depth to recurse directories')
#parser.add_argument('--path', dest='path', default=False,
action='store_true', help='Print the full path of files')
parser.add_argument('--glob', dest='glob', default=False, a ction=Util.StoreBoolean, help='Glob filenames') parser.add_argument('--glob', dest='glob', default=False, a ction=Util.StoreBoolean, help='Glob filenames')
parser.add_argument('--reduce', dest='reduce', default=0, type= int, const=sys.maxsize, nargs='?', parser.add_argument('--reduce', dest='reduce', default=0, type= int, const=sys.maxsize, nargs='?',
help='Reduce paths by N directories. No value for smart reduction') help='Reduce paths by N directories. No value for smart reduction')
parser.add_argument('--realpath', dest='realpath', default=True, ac tion=Util.StoreBoolean, help='Use the full path, expanding symlinks to their actual path components') parser.add_argument('--realpath', dest='realpath', default=True, ac tion=Util.StoreBoolean, help='Use the full path, expanding symlinks to their actual path components')
rangegrp = parser.add_mutually_exclusive_group() rangegrp = parser.add_mutually_exclusive_group()
rangegrp.add_argument('--range', dest='range', default=None, help="Use a range of backupsets. Format: 'Start:End ' Start and End can be names or backupset numbers. Either value can be left off to indicate the first or last set respectively") rangegrp.add_argument('--range', dest='range', default=None, help="Use a range of backupsets. Format: 'Start:End ' Start and End can be names or backupset numbers. Either value can be left off to indicate the first or last set respectively")
rangegrp.add_argument('--dates', dest='daterange', default=None, help="Use a range of dates for the backupsets. Form at: 'Start:End'. Start and End are names which can be intepreted liberally. Ei ther can be left off to indicate the first or last set respectively") rangegrp.add_argument('--dates', dest='daterange', default=None, help="Use a range of dates for the backupsets. Form at: 'Start:End'. Start and End are names which can be intepreted liberally. Ei ther can be left off to indicate the first or last set respectively")
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

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