+from __future__ import absolute_import
from subprocess import check_call
import struct, os, time
pi = iter(r)
for h in sorted(hashes):
- WVPASSEQ(str(pi.next()).encode('hex'), h.encode('hex'))
+ WVPASSEQ(str(next(pi)).encode('hex'), h.encode('hex'))
WVFAIL(r.find_offset('\0'*20))
print f, 'something else'
git.init_repo(bupdir)
exc(bup_exe, 'index', src)
- exc(bup_exe, 'save', '-n', 'src', '--strip', src)
- git_type = exo('git', '--git-dir', bupdir,
- 'cat-file', '-t', 'src').strip()
- git_size = int(exo('git', '--git-dir', bupdir,
+ oidx = exo(bup_exe, 'save', '-cn', 'src', '--strip', src).strip()
+ typ = exo('git', '--git-dir', bupdir,
+ 'cat-file', '-t', 'src').strip()
+ size = int(exo('git', '--git-dir', bupdir,
'cat-file', '-s', 'src'))
- it = git.cp().get('src', size=True)
- get_type, get_size = it.next()
+ it = git.cp().get('src')
+ get_info = it.next()
for buf in it.next():
pass
- WVPASSEQ(get_type, git_type)
- WVPASSEQ(get_size, git_size)
+ WVPASSEQ((oidx, typ, size), get_info)