Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion mergin/client_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,13 @@ def pull_project_finalize(job, user_name):
os.remove(basefile)
raise ClientError("Cannot patch basefile {}! Please try syncing again.".format(basefile))

conflicts = job.mp.apply_pull_changes(job.pull_changes, job.temp_dir, user_name)
try:
conflicts = job.mp.apply_pull_changes(job.pull_changes, job.temp_dir, user_name)
except Exception as e:
job.mp.log.error("Failed to apply pull changes: " + str(e))
job.mp.log.info("--- pull aborted")
raise ClientError("Failed to apply pull changes: " + str(e))

job.mp.metadata = {
'name': job.project_path,
'version': job.version if job.version else "v0", # for new projects server version is ""
Expand Down
7 changes: 6 additions & 1 deletion mergin/client_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ def push_project_finalize(job):
'version': job.server_resp['version'],
'files': job.server_resp["files"]
}
job.mp.apply_push_changes(job.changes)
try:
job.mp.apply_push_changes(job.changes)
except Exception as e:
job.mp.log.error("Failed to apply push changes: " + str(e))
job.mp.log.info("--- push aborted")
raise ClientError("Failed to apply push changes: " + str(e))

job.tmp_dir.cleanup() # delete our temporary dir and all its content

Expand Down