mergin/merginproject.py
def copy_versioned_file_for_upload(self, f, tmp_dir):
        """
        Make a temporary copy of the versioned file using geodiff, to make sure that we have full
        content in a single file (nothing left in WAL journal)
        """
        path = f["path"]
        self.log.info("Making a temporary copy (full upload): " + path)
        tmp_file = os.path.join(tmp_dir, path)
        os.makedirs(os.path.dirname(tmp_file), exist_ok=True)
        self.geodiff.make_copy_sqlite(self.fpath(path), tmp_file)
        f["size"] = os.path.getsize(tmp_file)
        f["checksum"] = generate_checksum(tmp_file)
        f["chunks"] = [str(uuid.uuid4()) for i in range(math.ceil(f["size"] / UPLOAD_CHUNK_SIZE))]
        f["upload_file"] = tmp_file
        return tmp_file

        Make a temporary copy of the versioned file using geodiff, to make sure that we have full
        content in a single file (nothing left in WAL journal)
        
Make a temporary copy of the versioned file using geodiff, to make sure that we have full
content in a single file (nothing left in WAL journal)
Make a temporary copy of the versioned file using geodiff to make sure that we have full content in a single file ( nothing left in WAL journal )
def copy_versioned_file_for_upload(self, f, tmp_dir):
        path = f["path"]
        self.log.info("Making a temporary copy (full upload): " + path)
        tmp_file = os.path.join(tmp_dir, path)
        os.makedirs(os.path.dirname(tmp_file), exist_ok=True)
        self.geodiff.make_copy_sqlite(self.fpath(path), tmp_file)
        f["size"] = os.path.getsize(tmp_file)
        f["checksum"] = generate_checksum(tmp_file)
        f["chunks"] = [str(uuid.uuid4()) for i in range(math.ceil(f["size"] / UPLOAD_CHUNK_SIZE))]
        f["upload_file"] = tmp_file
        return tmp_file
def copy_versioned_file_for_upload ( self , f , tmp_dir ) : path = f [ "path" ] self . log . info ( "Making a temporary copy (full upload): " + path ) tmp_file = os . path . join ( tmp_dir , path ) os . makedirs ( os . path . dirname ( tmp_file ) , exist_ok = True ) self . geodiff . make_copy_sqlite ( self . fpath ( path ) , tmp_file ) f [ "size" ] = os . path . getsize ( tmp_file ) f [ "checksum" ] = generate_checksum ( tmp_file ) f [ "chunks" ] = [ str ( uuid . uuid4 ( ) ) for i in range ( math . ceil ( f [ "size" ] / UPLOAD_CHUNK_SIZE ) ) ] f [ "upload_file" ] = tmp_file return tmp_file
Make a temporary copy of the versioned file using geodiff, to make sure that we have full
content in a single file (nothing left in WAL journal)
Make a temporary copy of the versioned file using geodiff to make sure that we have full content in a single file ( nothing left in WAL journal )
"""
        Make a temporary copy of the versioned file using geodiff, to make sure that we have full
        content in a single file (nothing left in WAL journal)
        """
self
f
tmp_dir