[Bug 3735] New: update to old revision with subrepository with largefiles escapes with exception

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Mon Dec 17 05:13:06 CST 2012


http://bz.selenic.com/show_bug.cgi?id=3735

          Priority: normal
            Bug ID: 3735
                CC: mercurial-devel at selenic.com, natosha at gmail.com
          Assignee: bugzilla at selenic.com
           Summary: update to old revision with subrepository with
                    largefiles escapes with exception
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: Bastian.Wassermann at multivac.de
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: largefiles
           Product: Mercurial

When i try to update my main-repository (without subs any more) to an old
revision with subs that have largefiles enabled, it appears the exception and
the end of this description.

That exception only appears, if i enter a different default-push server to the
hgrc file. if there is no default-push server entered, the update works fine.
That is strange behavior for me, because, while update there should bo no
communication to default-push server (in my opinion). 
I tried to debug the method calls, because i want to contibute to mercurial
community with bugfixes, by mythelf, but i found no suitable way to get prints
in tortoise console to debug the method calls. Maybe someone can give me a
hint, how to write debug notes to tortoise console. 

How far i stepped into the exception, i identified the method
lfutil.findfile(repo, hash) to be wrong.

I tried debug messages like this:
#     print ('findfile: %s - %s\n') % (hash, repo) 
#     raise util.Abort(_('findfile: %s - %s\n') % (hash, repo))
#     repo.ui.status(_('new message\n'))
#     repo.ui.note(_('new message\n'))

With the raise util.Abort code i got the print:
Abort: findfile: 4 - <hgext.largefiles.reposetup.lfilesrepo object at
0x00C29BD0>

And that lookes wired, because the hash has only one digit.


Exception message in tortoisehg:
'http://muwo-st/hg/IPC_neu_push/' does not appear to be an hg repository:
---%<--- (text/html)
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font><body
bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica,
arial"> <br><big><big><strong><class
'mercurial.error.Abort'></strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial">Python 2.7.3: C:\Python27\python.exe<br>Mon Dec 17 11:47:08 2012</font></td></tr></table>

<p>A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.</p>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\se\intranet\hg\hgweb.cgi">C:\se\intranet\hg\hgweb.cgi</a> in
<strong><module></strong>()</td></tr>
<tr><td><font
color="#909090"><tt>  <small>   19</small> <br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   20</small> from mercurial import demandimport; demandimport.enable()<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   21</small> from mercurial.hgweb import hgweb, wsgicgi<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   22</small> application = hgweb(config)<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>   23</small> wsgicgi.launch(application)<br>
</tt></td></tr>
<tr><td><small><font color="#909090"><strong>wsgicgi</strong> = <module
'mercurial.hgweb.wsgicgi' from
'C:\Python27\lib\site-packages\mercurial\hgweb\wsgicgi.pyc'>,
wsgicgi.<strong>launch</strong> = <function launch>,
<strong>application</strong> = <mercurial.hgweb.hgwebdir_mod.hgwebdir
object></font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\hgweb\wsgicgi.py">C:\Python27\lib\site-packages\mercurial\hgweb\wsgicgi.py</a>
in
<strong>launch</strong>(application=<mercurial.hgweb.hgwebdir_mod.hgwebdir
object>)</td></tr>
<tr><td><font
color="#909090"><tt>  <small>   74</small>         return write<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   75</small> <br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>   76</small>     content = application(environ, start_response)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   77</small>     try:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   78</small>         for chunk in content:<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090">content <em>undefined</em>,
<strong>application</strong> = <mercurial.hgweb.hgwebdir_mod.hgwebdir
object>, <strong>environ</strong> = {'ALLUSERSPROFILE':
r'C:\ProgramData', 'APPDATA':
r'C:\Windows\system32\config\systemprofile\AppData\Roaming', 'APP_POOL_ID': 'SE
Intranet1', 'APR_ICONV1_PATH': r'C:\Program Files (x86)\Subversion
Edge\bin\iconv\', 'AUTH_PASSWORD': 'Orishas35', 'AUTH_TYPE': 'Basic',
'AUTH_USER': 'wassermb', 'CERT_COOKIE': '', 'CERT_FLAGS': '', 'CERT_ISSUER':
'', ...}, <strong>start_response</strong> = <function
start_response></font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py">C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py</a>
in <strong>__call__</strong>(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir
object>, env={'ALLUSERSPROFILE': r'C:\ProgramData', 'APPDATA':
r'C:\Windows\system32\config\systemprofile\AppData\Roaming', 'APP_POOL_ID': 'SE
Intranet1', 'APR_ICONV1_PATH': r'C:\Program Files (x86)\Subversion
Edge\bin\iconv\', 'AUTH_PASSWORD': 'Orishas35', 'AUTH_TYPE': 'Basic',
'AUTH_USER': 'wassermb', 'CERT_COOKIE': '', 'CERT_FLAGS': '', 'CERT_ISSUER':
'', ...}, respond=<function start_response>)</td></tr>
<tr><td><font
color="#909090"><tt>  <small>  145</small>     def __call__(self, env, respond):<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  146</small>         req = wsgirequest(env, respond)<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>  147</small>         return self.run_wsgi(req)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  148</small> <br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  149</small>     def read_allowed(self, ui, req):<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>self</strong> =
<mercurial.hgweb.hgwebdir_mod.hgwebdir object>,
self.<strong>run_wsgi</strong> = <bound method hgwebdir.run_wsgi of
<mercurial.hgweb.hgwebdir_mod.hgwebdir object>>,
<strong>req</strong> = <mercurial.hgweb.request.wsgirequest
object></font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py">C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py</a>
in <strong>run_wsgi</strong>(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir
object>, req=<mercurial.hgweb.request.wsgirequest object>)</td></tr>
<tr><td><font
color="#909090"><tt>  <small>  203</small>                         try:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  204</small>                             repo = hg.repository(self.ui, real)<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>  205</small>                             return hgweb(repo).run_wsgi(req)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  206</small>                         except IOError, inst:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  207</small>                             msg = inst.strerror<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em>
<strong>hgweb</strong> = <class 'mercurial.hgweb.hgweb_mod.hgweb'>,
<strong>repo</strong> = <hgext.largefiles.reposetup.lfilesrepo
object>, ).run_wsgi <em>undefined</em>, <strong>req</strong> =
<mercurial.hgweb.request.wsgirequest
object></font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\hgweb\hgweb_mod.py">C:\Python27\lib\site-packages\mercurial\hgweb\hgweb_mod.py</a>
in <strong>run_wsgi</strong>(self=<mercurial.hgweb.hgweb_mod.hgweb
object>, req=<mercurial.hgweb.request.wsgirequest object>)</td></tr>
<tr><td><font
color="#909090"><tt>  <small>  126</small>                 if cmd in perms:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  127</small>                     self.check_perm(req, perms[cmd])<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>  128</small>                 return protocol.call(self.repo, req, cmd)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  129</small>             except ErrorResponse, inst:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  130</small>                 # A client that sends unbundle without 100-continue will<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em>
<strong>protocol</strong> = <module 'mercurial.hgweb.protocol' from
'C:\Pyth...\lib\site-packages\mercurial\hgweb\protocol.pyc'>,
protocol.<strong>call</strong> = <function call>,
<strong>self</strong> = <mercurial.hgweb.hgweb_mod.hgweb object>,
self.<strong>repo</strong> = <hgext.largefiles.reposetup.lfilesrepo
object>, <strong>req</strong> = <mercurial.hgweb.request.wsgirequest
object>, <strong>cmd</strong> =
'getlfile'</font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\hgweb\protocol.py">C:\Python27\lib\site-packages\mercurial\hgweb\protocol.py</a>
in <strong>call</strong>(repo=<hgext.largefiles.reposetup.lfilesrepo
object>, req=<mercurial.hgweb.request.wsgirequest object>,
cmd='getlfile')</td></tr>
<tr><td><font
color="#909090"><tt>  <small>   74</small> def call(repo, req, cmd):<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   75</small>     p = webproto(req, repo.ui)<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>   76</small>     rsp = wireproto.dispatch(repo, p, cmd)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   77</small>     if isinstance(rsp, str):<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   78</small>         req.respond(HTTP_OK, HGTYPE, length=len(rsp))<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090">rsp <em>undefined</em>, <em>global</em>
<strong>wireproto</strong> = <module 'mercurial.wireproto' from
'C:\Python27\lib\site-packages\mercurial\wireproto.pyc'>,
wireproto.<strong>dispatch</strong> = <function dispatch>,
<strong>repo</strong> = <hgext.largefiles.reposetup.lfilesrepo
object>, <strong>p</strong> = <mercurial.hgweb.protocol.webproto
object>, <strong>cmd</strong> =
'getlfile'</font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\mercurial\wireproto.py">C:\Python27\lib\site-packages\mercurial\wireproto.py</a>
in <strong>dispatch</strong>(repo=<hgext.largefiles.reposetup.lfilesrepo
object>, proto=<mercurial.hgweb.protocol.webproto object>,
command='getlfile')</td></tr>
<tr><td><font
color="#909090"><tt>  <small>  349</small>     func, spec = commands[command]<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  350</small>     args = proto.getargs(spec)<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>  351</small>     return func(repo, proto, *args)<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  352</small> <br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>  353</small> def options(cmd, keys, others):<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>func</strong> = <function
getlfile>, <strong>repo</strong> =
<hgext.largefiles.reposetup.lfilesrepo object>,
<strong>proto</strong> = <mercurial.hgweb.protocol.webproto object>,
<strong>args</strong> =
['443622682a3048cdc8f8d0d725cee0d6bd37ce64']</font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a
href="file://C:\Python27\lib\site-packages\hgext\largefiles\proto.py">C:\Python27\lib\site-packages\hgext\largefiles\proto.py</a>
in <strong>getlfile</strong>(repo=<hgext.largefiles.reposetup.lfilesrepo
object>, proto=<mercurial.hgweb.protocol.webproto object>,
sha='443622682a3048cdc8f8d0d725cee0d6bd37ce64')</td></tr>
<tr><td><font
color="#909090"><tt>  <small>   49</small>     if not filename:<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   50</small> #         raise util.Abort(_('requested largefile %s not present in cache - %s - %s') % (sha, repo, proto))<br>
</tt></font></td></tr>
<tr><td
bgcolor="#ffccee"><tt>=><small>   51</small>         raise util.Abort(_('requested largefile %s not present in cache') % (sha))<br>
</tt></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   52</small>     f = open(filename, 'rb')<br>
</tt></font></td></tr>
<tr><td><font
color="#909090"><tt>  <small>   53</small>     length = os.fstat(f.fileno())[6]<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em>
<strong>util</strong> = <module 'mercurial.util' from
'C:\Python27\lib\site-packages\mercurial\util.pyc'>,
util.<strong>Abort</strong> = <class 'mercurial.error.Abort'>,
<em>global</em> <strong>_</strong> = <function gettext>,
<strong>sha</strong> =
'443622682a3048cdc8f8d0d725cee0d6bd37ce64'</font></small></td></tr></table><p><strong><class
'mercurial.error.Abort'></strong>: requested largefile
443622682a3048cdc8f8d0d725cee0d6bd37ce64 not present in cache
<br><tt><small>     </small> </tt>args =
('requested largefile 443622682a3048cdc8f8d0d725cee0d6bd37ce64 not present in
cache',)
<br><tt><small>     </small> </tt>hint =
None
<br><tt><small>     </small> </tt>message =
'requested largefile 443622682a3048cdc8f8d0d725cee0d6bd37ce64 not present in
cache'


<!-- The above is a description of an error in a Python program, formatted
     for a Web browser because the 'cgitb' module was enabled.  In case you
     are not reading this in a Web browser, here is the original traceback:

Traceback (most recent call last):
  File "C:\se\intranet\hg\hgweb.cgi", line 23, in <module>
    wsgicgi.launch(application)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\wsgicgi.py", line 76, in
launch
    content = application(environ, start_response)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line
147, in __call__
    return self.run_wsgi(req)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line
205, in run_wsgi
    return hgweb(repo).run_wsgi(req)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\hgweb_mod.py", line 128,
in run_wsgi
    return protocol.call(self.repo, req, cmd)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\protocol.py", line 76, in
call
    rsp = wireproto.dispatch(repo, p, cmd)
  File "C:\Python27\lib\site-packages\mercurial\wireproto.py", line 351, in
dispatch
    return func(repo, proto, *args)
  File "C:\Python27\lib\site-packages\hgext\largefiles\proto.py", line 51, in
getlfile
    raise util.Abort(_('requested largefile %s not present in cache') % (sha))
Abort: requested largefile 443622682a3048cdc8f8d0d725cee0d6bd37ce64 not present
in cache

-->

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list