Skip to content

Commit 88f00ea

Browse files
committed
make tests runnable with checking current version - Please update your local copy
1 parent 57c6bf4 commit 88f00ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mergin/client_push.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ def push_project_async(mc, directory) -> Optional[UploadJob]:
341341
raise ClientError(f"You do not seem to have write access to the project (username '{username}')")
342342

343343
# DISCUSSION: do we want to check if the project is up to date before pushing? For now, we removed this part
344-
# if local_version != server_version:
345-
# mp.log.error(f"--- push {project_path} - not up to date (local {local_version} vs server {server_version})")
346-
# raise ClientError(
347-
# "There is a new version of the project on the server. Please update your local copy."
348-
# + f"\n\nLocal version: {local_version}\nServer version: {server_version}"
349-
# )
344+
if local_version != server_version:
345+
mp.log.error(f"--- push {project_path} - not up to date (local {local_version} vs server {server_version})")
346+
raise ClientError(
347+
"There is a new version of the project on the server. Please update your local copy."
348+
+ f"\n\nLocal version: {local_version}\nServer version: {server_version}"
349+
)
350350

351351
changes = mp.get_push_changes()
352352
changes = filter_changes(mc, project_info, changes)

0 commit comments

Comments
 (0)