def pack_objects(repo, object_ids, packf, idxf, delta_window_size=None):
 with open_repo_closing(repo) as r:
  (entries, data_sum) = write_pack_objects(packf, r.object_store.iter_shas(((oid, None) for oid in object_ids)), delta_window_size=delta_window_size)
 if (idxf is not None):
  entries = [(k, v[0], v[1]) for (k, v) in entries.items()]
  entries.sort()
  write_pack_index(idxf, entries, data_sum)

def pack_objects ( repo , object_ids , packf , idxf , delta_window_size = None ) : with open_repo_closing ( repo ) as r : ( entries , data_sum ) = write_pack_objects ( packf , r . object_store . iter_shas ( ( ( oid , None ) for oid in object_ids ) ) , delta_window_size = delta_window_size ) if ( idxf is not None ) : entries = [ ( k , v [ 0 ] , v [ 1 ] ) for ( k , v ) in entries . items ( ) ] entries . sort ( ) write_pack_index ( idxf , entries , data_sum )
pack objects into a file .