Skip to content

Conversation

@MarcelGeo
Copy link
Contributor

@MarcelGeo MarcelGeo commented Dec 8, 2025

Resolved #280

  • new pull mechanism using /delta endpoint, where pull changes between current version and server are calculated from delta items
  • tests for both v2 and v1 features
  • projectinfo v2 compatibility test

Fixes

  • handle conflicting copy of versioned files properly without rebase logic

Pull logic updates

  • in pull_project_async is check if server supports v2_pull

  • If supports: get pull delta from server

  • If not: calculate pull delta from files and projects config.json

  • Then calculate delta items between local files and server (local delta) - delta needs to be applied to server

  • Compare pull_delta and local_delta -> PullAction with actions needs to be done after files are downloaded from a server defined in PullActionType enum

  • Starting download

  • After download is finished -> call pull_project_finalize

  • Method apply_pull_actions is then responsible to finalize PullAction based on type

+ tests for both v2 and v1 features
+ projectinfo v2 compatibility test
@MarcelGeo MarcelGeo changed the base branch from master to v2-pull-integration December 8, 2025 12:07
@MarcelGeo MarcelGeo changed the title Initial dirty version of v2 pull integration + porject info v2 Initial version of v2 pull integration + project info v2 Dec 8, 2025
Copy link
Contributor

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's first do a bit of refactoring... the idea is that:

  • we introduce a new class that captures project delta (added/updated/updated_diff/deleted) files
  • the project delta class would be returned by get_pull_changes and get_push_changes
  • there would a function that can combine server changes (from get_pull_changes) and local changes (from get_push_changes) and return a list of tasks to do at the end of the pull (e.g. copy, copy conflict, apply diff, delete - like PullTask in mobile app's merginapi)
  • apply_pull_changes() would just go through the list of "pull tasks" and apply them, rather than again getting local changes and doing logic based on that

- models.py for some classes without specific location
- clenup of non-necssary functions from previous version
- refactor of pull handling using PullActions
+ descriptions
+ tests for appl_pull_actions
+ restore get_pull_changes for backward compatibility with project status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants