Closed Wind-stormger closed 1 year ago
I guess you already have a plan for this. @AmirHmZz
Currently, sync will perform a check and compare, and then pull the files that are not in the local folder from the board to the local, and then push the files that are not on the board or have changed locally to the board.
Yes, but with a difference, Currently it will:
To achieve what you've said, We have three possible options:
sync
command and dev
mode like -c
to clear flash storge before sync. mpbridge clear
to clear flash storage.Solution 2 and 3 can be used together, I mean we can have a -c
option beside the new clear
command.
What's your opinion?
Maybe a --force
is enough.
When using it, only sync based on the local directory, remove files that are not in the local directory, and synchronize changes in the local directory.
In my opinion, there is no need for an additional clean
function.
Because if I want to switch from project A to project B, they all depend on the two files ab.py
and cd.py
, you only need to remove the files that do not exist in project B.
Even if we need to delete all files, we only need to delete the files in the local folder.
@Wind-stormger Now you are able to perform a clean sync. Upgrade your mpbridge
to v1.1.
Thanks.
Very nice!
At the same time, I hope dev
can also have this feature.
Currently, sync will perform a check and compare, and then pull the files that are not in the local folder from the board to the local, and then push the files that are not on the board or have changed locally to the board.
But what if we need to delete some files on the board?
Suppose, when we need to switch projects to use on the same board, the content of many files or folders will be useless and occupy the flash.
At this time, some methods are needed, such as setting an additional requirement when syncing, only based on the files in the local folder, checking redundant files or subfolders on the board, and deleting them.