|
@@ -260,6 +260,12 @@ cd /opt/portcv && find portcv -name '*.py' | sort | xargs md5sum # 与仓库
|
|
|
结论:**逻辑无漂移**,`/opt/portcv` 可视为 `2b993ed`。以后每次拷代码都这么比一次——这两个文件已经出现过
|
|
结论:**逻辑无漂移**,`/opt/portcv` 可视为 `2b993ed`。以后每次拷代码都这么比一次——这两个文件已经出现过
|
|
|
「md5 不同但语义相同」的假警报,别一看到 md5 不一致就回滚。
|
|
「md5 不同但语义相同」的假警报,别一看到 md5 不一致就回滚。
|
|
|
|
|
|
|
|
|
|
+**换行符陷阱(比 docstring 换行更容易踩)**:板端 38 个 `.py` 全是 **CRLF**
|
|
|
|
|
+(`file` → `with CRLF line terminators`),因为是从 Windows 工作区拷过去的;而仓库 `.gitattributes`
|
|
|
|
|
+是 `text eol=lf`,**索引里存的是 LF**(`git ls-files --eol` → `i/lf w/crlf attr/text eol=lf`)。
|
|
|
|
|
+所以拿 Linux 侧 `git clone` 出来的文件去比,会 **38 个全不一致**——那是换行差异,不是逻辑漂移。
|
|
|
|
|
+正确姿势:与**部署源**(Windows 工作区)逐文件比,或两边先 `dos2unix` 再比;Python 对 CRLF 无感,不影响运行。
|
|
|
|
|
+
|
|
|
### 6.2 板上跑的是哪份配置
|
|
### 6.2 板上跑的是哪份配置
|
|
|
|
|
|
|
|
`ExecStart=/opt/portcv/.venv/bin/python -m portcv run -c /opt/portcv/configs/site.json`
|
|
`ExecStart=/opt/portcv/.venv/bin/python -m portcv run -c /opt/portcv/configs/site.json`
|