"""
# end of bup preamble
+from __future__ import absolute_import
import glob, math, os, resource, struct, sys, tempfile
from bup import options, git, midx, _helpers, xstat
+from bup.compat import range
from bup.helpers import (Sha1, add_error, atomically_replaced_file, debug1, fdatasync,
handle_ctrl_c, log, mmap_readwrite, qprogress,
saved_errors, unlink)
def _group(l, count):
- for i in xrange(0, len(l), count):
+ for i in range(0, len(l), count):
yield l[i:i+count]
-
-
+
+
def max_files():
mf = min(resource.getrlimit(resource.RLIMIT_NOFILE))
if mf > 32:
for n in ix.idxnames:
allfilenames.append(os.path.basename(n))
total += len(ix)
- inp.sort(lambda x,y: cmp(str(y[0][y[2]:y[2]+20]),str(x[0][x[2]:x[2]+20])))
+ inp.sort(reverse=True, key=lambda x: str(x[0][x[2]:x[2]+20]))
if not _first: _first = outdir
dirprefix = (_first != outdir) and git.repo_rel(outdir)+': ' or ''
print p.idxnames
assert(len(p) == total)
for pe, e in p, git.idxmerge(inp, final_progress=False):
- pin = pi.next()
+ pin = next(pi)
assert(i == pin)
assert(p.exists(i))