我正在尝试使用hgweb.wsgi脚本在Windows Server 2008 / IIS 7.5下的mercurial服务器上运行largefiles扩展。
当我在本地克隆一个带有大文件的repo时(但是使用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\
目录中删除文件,在服务器上克隆时会出现同样的错误,除非我使用文件系统路径进行克隆,在这种情况下,文件会被添加回`应用程序数据\本地\支持大型\'
编辑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调试器,但如果我可以在服务器上运行调试器,我可以缩小问题范围。
答案 0 :(得分:1)
最后想通了,扩展程序尝试将临时文件写入%windir%\System32\config\systemprofile\AppData\Local
,导致权限错误。该调用被包装在try-catch块中,最终返回“找不到文件”错误。
答案 1 :(得分:-1)