Mar*_*lli 6 synchronization unison
我正在尝试将主机 OSX 中的文件夹同步到运行 Ubuntu 的 VM。(laravel/宅基地)。这是我在主机上运行的命令:
$ unison ssh://vagrant@192.168.10.10//home/vagrant/www ~/unison/www -repeat watch
产生以下输出
Contacting server...
Connected [...]
Looking for changes
Waiting for changes from server
Fatal error: Server: Unexpected response 'Usage: unison-fsmonitor [options] root [path] [path]...' from the filesystem watcher (expected VERSION)
Run Code Online (Sandbox Code Playgroud)
在我的本地主机上:
$ unison -version
unison version 2.48.3
$ unison-fsmonitor
VERSION 1
Run Code Online (Sandbox Code Playgroud)
在我的虚拟机上:
$ unison -version
unison version 2.48.3
$ unison-fsmonitor
Usage: unison-fsmonitor [options] root [path] [path]...
This program monitors file system changes on all given (relative to root) paths
and dumps paths (relative to root) files to a file. When launched, this file is
recreated. While running new events are added. This can be read by UNISON
to trigger a sync on these files. If root is a valid unison profile, we attempt
to read all the settings from there.
Run Code Online (Sandbox Code Playgroud)
对于我的本地主机,我通过自制软件安装了 unison,并从 github下载了unox.py文件并将其安装到./usr/local/bin/unison-fsmonitor
对于我的虚拟机,我用ppa:eugenesan/ppa的步调一致,并下载了2.48.3版本的源从齐声网站获得的一份fsmonitor.py,我划归/usr/bin/unison-fsmonitor。
Unison 没有-repeat watch工作没有问题。
如果我尝试在 VM 内运行相同的命令(反转 ssh),我会得到相同的输出。我已经读过 unison-fsmonitor 应该遵守中描述的协议,/src/fswatch.ml而默认fsmonitor.py脚本似乎并非如此。我错过了什么吗?是否有另一个脚本应该用于 unison-fsmonitor 可执行文件?
当您从源代码编译 Unison 时,会unison-fsmonitor创建一个单独的可执行文件。当您运行它时,unison-fsmonitor它会打印VERSION 1然后按预期等待。只需在虚拟机上编译 Unison 并使用该可执行文件而不是fsmonitor.py脚本即可。
您可以在Unison 2.48.3 的更改日志中看到他们创建了一个新的文件观察器实用程序。fsmonitor.py如果您应该使用新实用程序,我不清楚为什么会包含在此版本中。或者也许新的实用程序和 python 脚本实际上执行不同的任务......?
| 归档时间: |
|
| 查看次数: |
6922 次 |
| 最近记录: |