qgis-plugin icon indicating copy to clipboard operation
qgis-plugin copied to clipboard

allow reusing folders

Open roya0045 opened this issue 3 years ago • 6 comments

Simple proposal PR to allow reusing existing folders instead of having to delete and recreate them or create duplicates.

Open to suggestions for code changes.

Fixes #182

roya0045 avatar Aug 09 '22 15:08 roya0045

@wonder-sk can you look at this PR please?

PeterPetrik avatar Aug 12 '22 07:08 PeterPetrik

@wonder-sk did you have any reservation or wanted me to make changes to this? I think the risk is fairly low, though this was a quick pr that could be improved if needed.

roya0045 avatar Dec 20 '22 12:12 roya0045

hi @roya0045 - apologies for the long silence. I think this approach overall makes sense, but there are two important bits missing by the look at the code:

  1. we should check first whether the project in the selected directory is the same as the project the user is trying to download
  2. when reusing a project directory, we should also pull the latest changes from the server (instead of just leaving the directory with possibly outdated version of the project)

wonder-sk avatar Mar 21 '23 21:03 wonder-sk

hi @roya0045 - apologies for the long silence. I think this approach overall makes sense, but there are two important bits missing by the look at the code:

  1. we should check first whether the project in the selected directory is the same as the project the user is trying to download
  2. when reusing a project directory, we should also pull the latest changes from the server (instead of just leaving the directory with possibly outdated version of the project)

I made a modified proposal, let me know what you think of it.

roya0045 avatar Mar 22 '23 14:03 roya0045

@wonder-sk Are the modifications adequate?

roya0045 avatar Apr 25 '23 13:04 roya0045

Tested on a more recent version and the following part is proving problematic https://github.com/MerginMaps/qgis-mergin-plugin/blob/93224742a112363f412354163f15d66752c0f251/Mergin/projects_manager.py#L191-L195

I have no clue why this exists.

roya0045 avatar Jul 12 '23 12:07 roya0045