sync
简介
域内域外同步工具(正常情况下不需要使用该pkg)
- pkg.sync的配置表:
readonly map _cfg := {
"url" : "http://localhost:8082/",
"project" : "project",
"author" : "author",
"branch" : "branch",
"root_path" : "root_path",
};
组件接口
sync.gs
| 函数原型 | 函数作用 |
|---|---|
| bool init(map cfg, bool show = true) | 初始化pkg.sync |
| mixed diff_all() | 显示远程缓存中所有修改的文件列表 |
| mixed diff(bool is_remote = false) | 显示本地/远程缓存中所有修改的文件列表 |
| mixed drop_all() | 删除远程缓存中所有修改的文件列表 |
| mixed drop(bool is_remote = false) | 删除本地/远程缓存中所有修改的文件列表 |
| mixed pull_all(bool dele_gs_file = false) | 拉取远程缓存中所有修改的文件列表 |
| mixed pull(bool dele_gs_file = false) | 拉取远程缓存中所有修改的文件列表,并对发生变更的.o文件进行替换 |
| void patchs() | 对发生变更的.o文件进行monkey.patch热更新 |
| mixed server(bool dele_gs_file = false) | 一键同步远程缓存中的改动:pull->patch |