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