我正在尝试使用 hgweb.wsgi 脚本让 largefiles 扩展在 Windows Server 2008 / IIS 7.5 下的 mercurial 服务器上工作。
当我在本地克隆带有大文件的存储库时(但使用https://domain/
,而不是文件系统路径),一切都被克隆得很好,但是当我在另一台机器上尝试它时,我得到了abort: remotestore: largefile XXXXX is missing
这是详细的输出:
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 177 changes to 177 files
calling hook changegroup.lfiles: <function checkrequireslfiles at 0x0000000002E00358>
updating to branch default
resolving manifests
getting .hglf/path/to.file
...
177 files updated, 0 files merged, 0 files removed, 0 files unresolved
getting changed largefiles
getting path/to.file:c0c81df934cd72ca980dd156984fa15987e3881d
abort: remotestore: largefile c0c81df934cd72ca980dd156984fa15987e3881dis missing
两台机器都有扩展工作。我试过禁用防火墙,但没有帮助。除了将它添加到 mercurial.ini 之外,我是否需要做任何事情来设置扩展?
编辑:如果我从服务器目录中删除文件,则在服务器上AppData\Local\largefiles\
克隆时会出现相同的错误,除非我使用文件系统路径进行克隆,在这种情况下,文件将添加回 `AppData\Local\largefiles\'
编辑 2:这是调试输出和回溯:
177 files updated, 0 files merged, 0 files removed, 0 files unresolved
getting changed largefiles
using http://domain
sending capabilities command
getting largefiles: 0/75 lfile (0.00%)
getting path/to.file:64f2c341fb3b1adc7caec0dc9c51a97e51ca6034
sending statlfile command
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 87, in _runcatch
File "mercurial\dispatch.pyo", line 685, in _dispatch
File "mercurial\dispatch.pyo", line 467, in runcommand
File "mercurial\dispatch.pyo", line 775, in _runcommand
File "mercurial\dispatch.pyo", line 746, in checkargs
File "mercurial\dispatch.pyo", line 682, in <lambda>
File "mercurial\util.pyo", line 463, in check
File "mercurial\commands.pyo", line 1167, in clone
File "mercurial\hg.pyo", line 400, in clone
File "mercurial\extensions.pyo", line 184, in wrap
File "hgext\largefiles\overrides.pyo", line 629, in hgupdate
File "hgext\largefiles\lfcommands.pyo", line 416, in updatelfiles
File "hgext\largefiles\lfcommands.pyo", line 398, in cachelfiles
File "hgext\largefiles\basestore.pyo", line 80, in get
File "hgext\largefiles\remotestore.pyo", line 56, in _getfile
Abort: remotestore: largefile 64f2c341fb3b1adc7caec0dc9c51a97e51ca6034 is missing
该_getfile
函数引发异常,因为该statlfile
命令返回未找到该文件。
我自己从来没有使用过python,所以我不知道我在尝试调试它时在做什么:D
AFAIK 该statlfile
命令在服务器上执行,因此我无法从本地计算机上对其进行调试。我试过python -m win32traceutil
在服务器上运行,但它没有显示任何内容。我也尝试在服务器的 mercurial 配置文件中设置accesslog
和errorlog
,但它不会生成它们。
我通过 hgweb.wsgi 脚本运行 hg,我不知道是否/如何使用它进入 python 调试器,但如果我能让调试器在服务器上运行,我可以缩小问题范围......