74
74
# The data returned here can be in any order, but we've already created all
76
76
flags = os.O_CREAT | os.O_TRUNC | os.O_WRONLY | getattr(os, 'O_BINARY', 0)
77
for (relpath, treepath, file_id), chunks in tree.iter_files_bytes(to_fetch):
78
78
fullpath = osutils.pathjoin(dest, relpath)
79
79
# We set the mode and let the umask sort out the file info
83
83
out = os.fdopen(os.open(fullpath, flags, mode), 'wb')