Part of lp.codehosting.codeimport.worker View In Hierarchy
Import workers can store and retreive files into and from the store using
So this store can find files stored by previous versions of this code, the
files are stored at <BRANCH ID IN HEX>.<EXT> where BRANCH ID comes
from the CodeImportSourceDetails used to construct the instance and EXT
comes from the local name passed to
local_nameto the name used to store a file.
The algorithm is a little stupid for historical reasons: we chop off the extension and stick that on the end of the branch id from the source_details we were constructed with, in hex padded to 8 characters. For example 'tree.tar.gz' might become '0000a23d.tar.gz' or 'git.db' might become '00003e4.db'.
|Parameters||local_name||The local name of the file to be stored.|
|Returns||The name to store the file as on the remote transport.|
filenamefrom the store.
|Parameters||filename||The name of the file to retrieve (must be a filename, not a path).|
|dest_transport||The transport to retrieve the file to, defaulting to get_transport_from_path('.').|
|Returns||A boolean, true if the file was found and retrieved, false otherwise.|