import os, sys, struct, subprocess
from bup import options, git, vfs, vint
+from bup.compat import hexstr
from bup.git import MissingObject
from bup.helpers import (Conn, debug1, debug2, linereader, lines_until_sentinel,
log)
debug1("bup server: suggesting index %s\n"
% git.shorten_hash(name))
debug1("bup server: because of object %s\n"
- % shar.encode('hex'))
+ % hexstr(shar))
conn.write('index %s\n' % name)
suggested.add(name)
continue
refs = tuple(x[:-1] for x in lines_until_sentinel(conn, '\n', Exception))
args = git.rev_list_invocation(refs, count=count, format=fmt)
p = subprocess.Popen(git.rev_list_invocation(refs, count=count, format=fmt),
- preexec_fn=git._gitenv(git.repodir),
+ env=git._gitenv(git.repodir),
stdout=subprocess.PIPE)
while True:
out = p.stdout.read(64 * 1024)