MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / sync

Method sync

python/collaboration/file.py:409–425  ·  view source on GitHub ↗

Completely sync a file, pushing/pulling/merging/applying changes :param bv_or_db: Binary view or database to sync with :param conflict_handler: Function to call to resolve snapshot conflicts :param name_changeset: Function to call for naming a pushed changeset, if necessary :param progre

(self, bv_or_db: Union['BinaryView', 'Database'], conflict_handler: 'util.ConflictHandlerType', progress: 'util.ProgressFuncType' = util.nop, name_changeset: 'util.NameChangesetFuncType' = util.nop)

Source from the content-addressed store, hash-verified

407 return file
408
409 def sync(self, bv_or_db: Union['BinaryView', 'Database'], conflict_handler: 'util.ConflictHandlerType', progress: 'util.ProgressFuncType' = util.nop, name_changeset: 'util.NameChangesetFuncType' = util.nop):
410 """
411 Completely sync a file, pushing/pulling/merging/applying changes
412
413 :param bv_or_db: Binary view or database to sync with
414 :param conflict_handler: Function to call to resolve snapshot conflicts
415 :param name_changeset: Function to call for naming a pushed changeset, if necessary
416 :param progress: Function to call for progress updates
417 :raises RuntimeError: If there was an error (or the operation was cancelled)
418 """
419 if isinstance(bv_or_db, BinaryView):
420 if not bv_or_db.file.has_database:
421 raise RuntimeError("Cannot sync non-database view")
422 db = bv_or_db.file.database
423 else:
424 db = bv_or_db
425 databasesync.sync_database(db, self, conflict_handler, progress, name_changeset)
426
427 def pull(self, bv_or_db: Union['BinaryView', 'Database'], conflict_handler: 'util.ConflictHandlerType', progress: 'util.ProgressFuncType' = util.nop, name_changeset: 'util.NameChangesetFuncType' = util.nop):
428 """

Callers 2

download_to_bndbMethod · 0.95
mainFunction · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36