問題:
19/06/10更新:更多證據問題是服務器端。在Windows 7上命令行收到此錯誤(參見下面的完整回溯):當試圖將大文件推送到服務器時,Mercurial客戶端錯誤255和HTTP錯誤404
URLError: <urlopen error [Errno 10054] An existing connection was forcibly closed by the remote host>
abort: error: An existing connection was forcibly closed by the remote host
當試圖包含6個大文件變更文件(.exe,的.dmg等)推到我的遠程服務器我的客戶( MacHG)報告了錯誤:
"Error During Push. Mercurial reported error number 255: abort: HTTP Error 404: Not Found"
錯誤甚至是什麼意思?!唯一的(我可以告訴)這個提交的唯一的東西是文件的大小,類型和文件名。如何確定變更集中的哪個確切文件失敗?如何從存儲庫中刪除損壞的變更集?在另一篇文章中,有人報告使用「mq」擴展來有效地從存儲庫中的歷史記錄中刪除錯誤的變更集,但mq看起來過於複雜,我試圖解決。
背景:
我可以推拉如下:同時使用MacHG和toirtoise HG源文件,目錄,.class文件和一個.jar文件,並從服務器。
我成功地向我的本地存儲庫中第一次添加了6個大的.exe,.dmg等安裝文件(總共大約130Mb)。
在以下提交到我的本地存儲庫中,我刪除(「未跟蹤」/忘記)導致該問題的6個文件,但先前(失敗)的變更集仍然排隊推送到服務器(即我的本地主機試圖推動「添加」,然後「移除」到遠程服務器 - 並與源代碼管理系統的「保持所有歷史」理念保持一致)。
我可以使用Windows PC上的TortoiseHG提交.txt .java文件等。我實際上沒有使用TortoiseHG測試提交或推送相同的大文件。
請幫忙!
設置:
客戶端應用程序= MacHG v0.9.7(SCM 1.5.4),和TortoiseHG v1.0.4(SCM 1.5.4)
服務器= HTTPS,IIS7.5,水銀1.5.4,2.6.5的Python,安裝,使用以下指令:
http://www.jeremyskinner.co.uk/mercurial-on-iis7/
在IIS7.5的CGI處理程序被配置來處理所有動詞(不只是GET,POST和HEAD)。在服務器上
我hgweb.cgi文件如下:
#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# Path to repo or hgweb config to serve (see 'hg help hgweb')
#config = "/path/to/repo/or/config"
# Uncomment and adjust if Mercurial is not installed system-wide:
#import sys; sys.path.insert(0, "/path/to/python/lib")
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb('C:\inetpub\wwwroot\hg\hgweb.config')
wsgicgi.launch(application)
我hgweb。在服務器上的配置文件如下:
從我的MacBook在命令行[collections]
C:\Mercurial Repositories = C:\Mercurial Repositories
[web]
baseurl = /hg
allow_push = usernamea
allow_push = usernameb
輸出使用-v和--trackback標誌(包括水銀和MacHG安裝):從Windows
macbook15:hgrepos coderunner$ hg -v --traceback push
pushing to https://coderunner:***@hg.mydomain.com.au/hg/hgrepos
searching for changes
3 changesets found
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 50, in _runcatch
return _dispatch(ui, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 471, in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 341, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 522, in _runcommand
return checkargs()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 476, in checkargs
return cmdfunc()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 470, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/util.py", line 401, in check
return func(*args, **kwargs)
File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 2462, in push
r = repo.push(other, opts.get('force'), revs=revs)
File "/Library/Python/2.6/site-packages/mercurial/localrepo.py", line 1491, in push
return self.push_unbundle(remote, force, revs)
File "/Library/Python/2.6/site-packages/mercurial/localrepo.py", line 1636, in push_unbundle
return remote.unbundle(cg, remote_heads, 'push')
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 235, in unbundle
heads=' '.join(map(hex, heads)))
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 134, in do_read
fp = self.do_cmd(cmd, **args)
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 85, in do_cmd
resp = self.urlopener.open(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 389, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 502, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 427, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 510, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
abort: HTTP Error 404: Not Found
macbook15:hgrepos coderunner$
輸出7主機(只安裝TortoiseHG)試圖在同一文件推到服務器(不同changset,但包含相同的6個文件添加作爲變更從的MacBook被推)
c:\repositories\hgrepos>hg -v --traceback push
pushing to https://coderunner:***@hg.mydomain.com.au/hg/hgrepos
searching for changes
1 changesets found
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 50, in _runcatch
File "mercurial\dispatch.pyo", line 471, in _dispatch
File "mercurial\dispatch.pyo", line 341, in runcommand
File "mercurial\dispatch.pyo", line 522, in _runcommand
File "mercurial\dispatch.pyo", line 476, in checkargs
File "mercurial\dispatch.pyo", line 470, in <lambda>
File "mercurial\util.pyo", line 401, in check
File "mercurial\commands.pyo", line 2462, in push
File "mercurial\localrepo.pyo", line 1491, in push
File "mercurial\localrepo.pyo", line 1636, in push_unbundle
File "mercurial\httprepo.pyo", line 235, in unbundle
File "mercurial\httprepo.pyo", line 134, in do_read
File "mercurial\httprepo.pyo", line 85, in do_cmd
File "urllib2.pyo", line 389, in open
File "urllib2.pyo", line 407, in _open
File "urllib2.pyo", line 367, in _call_chain
File "mercurial\url.pyo", line 523, in https_open
File "mercurial\keepalive.pyo", line 259, in do_open
URLError: <urlopen error [Errno 10054] An existing connection was forcibly closed by the remote host>
abort: error: An existing connection was forcibly closed by the remote host
c:\repositories\hgrepos>
這是一個保持活力的問題? IIS7.5有問題嗎? Python 2.6.5有問題?
另一個信息來源是從命令行運行並傳入-v和--traceback標誌: hg -v --traceback push – 2010-06-18 17:41:51