Creating a commit that points to objects (hashes) from other commits

Hi - I am hoping someone can assist me. We have a Work in Progress (WIP) branch in which we maintain only the approved geometry, and then we have a Shared branch that is provided to our client. I want to make one commit that combines the approved geometry in the Shared branch, but I want to just point that commit to the objects that already exist on the server instead of reserializing them.

Ideally I can do this in python, is it possible?

This is absolutely possible yes.

I previously shared a means to merge models with Python. The third method I listed (the subtle one) is closest to your goal.

It’s unclear to me from your question if the approved geometry is a totality of all the versions or selective. Elements. Assuming it is multiple whole commits, that tutorial will be enough.

The significant step worth repeating is to recreate the closure table of all the referenced objects.

Thanks @jonathon - I followed the tutorial but (still) get the following error, is it a limit on the server side for any commit, even if it is referencing other objects on the server?

Upload server response: Error inserting object in the database: Object too large. (18.053632 MB is > than limit, 10 MB)
Error sending batch of objects to server: SpeckleException: Could not save the object to the server - status code 400 (Error inserting object in the database: Object too large. (18.053632 MB
is > than limit, 10 MB))

I think what is failing is indeed the size of the closures table.

Try sending that commit without adding it.

This should still be receiving in our connectors but may not display correctly in the we application.

What you could also look at is treating that closures list as a unique set to make sure there are no duplicates in it.

I am not sure I follow what to send without the closures, do I just create the commit using the hash instead of the obj_ids returned from the traverse_base def?