revision 1387 (61a6a7bf2cbd) : Runtime errors under windows and mercurial 1.8.2

Issue #185 resolved
Marc VILLETARD created an issue

Hello,

I tried RhodeCode revision 1387 (61a6a7bf2cbd) under windows os, python 2.7.1, mercurial 1.8.2 and some runtime errors have shown up.

I patched them to test RhodeCode. I don't patch them the cleanest way.

Please find that patch in attachement.

Have a good day. Marc VILLETARD.

Comments (6)

  1. Marcin Kuzminski repo owner

    Hi, great thanks for patch, however can you put a little more details regarding

    - st = d.stat() + #st = d.stat() + st = (0, 0)

    This part, and why this was a problem ?

  2. Marc VILLETARD reporter

    With revision 1387 (61a6a7bf2cbd), when I go to a changeset of a repository ( exemple: http://192.168.0.102:5000/rhodecode/changeset/856be614d9a4b565107c1def070ec95ca2b5acce ), I have the following runtime error :

    ←[1;32m2011-05-05 14:35:06.562 INFO  [paste.httpserver.ThreadPool:650] No idle t
    asks, and only 4 busy tasks; adding 1 more workers←[0m
    Error - <type 'exceptions.AttributeError'>: 'DiffProcessor' object has no attrib
    ute 'stat'
    URL: http://192.168.0.102:5000/rhodecode/changeset/856be614d9a4b565107c1def070ec
    95ca2b5acce
    File 'c:\\Python27\\lib\\site-packages\\weberror-0.10.3-py2.7.egg\\weberror\\err
    ormiddleware.py', line 162 in __call__
      app_iter = self.application(environ, sr_checker)
    File 'c:\\Python27\\lib\\site-packages\\rhodecode-1.2.0beta-py2.7.egg\\rhodecode
    \\lib\\middleware\\simplegit.py', line 107 in __call__
      return self.application(environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\rhodecode-1.2.0beta-py2.7.egg\\rhodecode
    \\lib\\middleware\\simplehg.py', line 72 in __call__
      return self.application(environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\beaker-1.5.4-py2.7.egg\\beaker\\middlewa
    re.py', line 152 in __call__
      return self.wrap_app(environ, session_start_response)
    File 'c:\\Python27\\lib\\site-packages\\routes-1.12.3-py2.7.egg\\routes\\middlew
    are.py', line 131 in __call__
      response = self.app(environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\wsgiapp.py
    ', line 107 in __call__
      response = self.dispatch(controller, environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\wsgiapp.py
    ', line 312 in dispatch
      return controller(environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\rhodecode-1.2.0beta-py2.7.egg\\rhodecode
    \\lib\\base.py', line 49 in __call__
      return WSGIController.__call__(self, environ, start_response)
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controller
    s\\core.py', line 211 in __call__
      response = self._dispatch_call()
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controller
    s\\core.py', line 162 in _dispatch_call
      response = self._inspect_call(func)
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controller
    s\\core.py', line 105 in _inspect_call
      result = self._perform_call(func, args)
    File 'c:\\Python27\\lib\\site-packages\\pylons-1.0-py2.7.egg\\pylons\\controller
    s\\core.py', line 57 in _perform_call
      return func(**args)
    File 'c:\\Python27\\lib\\site-packages\\rhodecode-1.2.0beta-py2.7.egg\\rhodecode
    \\controllers\\changeset.py', line 157 in index
      st = d.stat()
    AttributeError: 'DiffProcessor' object has no attribute 'stat'
    
    
    CGI Variables
    -------------
      CONTENT_LENGTH: '0'
      CONTENT_TYPE: '; charset="utf-8"'
      HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    
      HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
      HTTP_ACCEPT_ENCODING: 'gzip, deflate'
      HTTP_ACCEPT_LANGUAGE: 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
      HTTP_CONNECTION: 'keep-alive'
      HTTP_COOKIE: 'rhodecode=519e76f74aecaa951c7d6e9975bdcf871ee5115c8d19246c3503d0
    e07ac07c59f34f503e'
      HTTP_HOST: '192.168.0.102:5000'
      HTTP_KEEP_ALIVE: '115'
      HTTP_REFERER: 'http://192.168.0.102:5000/rhodecode/summary'
      HTTP_USER_AGENT: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefo
    x/4.0.1'
      PATH_INFO: '/rhodecode/changeset/856be614d9a4b565107c1def070ec95ca2b5acce'
      REMOTE_ADDR: '192.168.0.102'
      REQUEST_METHOD: 'GET'
      SERVER_NAME: '192.168.0.102'
      SERVER_PORT: '5000'
      SERVER_PROTOCOL: 'HTTP/1.1'
    
    
    WSGI Variables
    --------------
      application: <rhodecode.lib.middleware.simplegit.SimpleGit object at 0x02078AD
    0>
      beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.mi
    ddleware.SessionMiddleware object at 0x02078210>>
      beaker.session: {'_authentication_token': 'b2e3f9a5432ff43eeefe352950fc4121a47
    35d5d', 'rhodecode_user': <AuthUser('id:2:admin|True')>, '_accessed_time': 13045
    98910.298, '_creation_time': 1304580414.854}
      paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x0183851
    0>
      paste.registry: <paste.registry.Registry object at 0x0208C2D0>
      paste.throw_errors: True
      pylons.action_method: <bound method ChangesetController.index of <rhodecode.co
    ntrollers.changeset.ChangesetController object at 0x024961D0>>
      pylons.controller: <rhodecode.controllers.changeset.ChangesetController object
     at 0x024961D0>
      pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'}
      pylons.pylons: <pylons.util.PylonsContext object at 0x023721F0>
      pylons.routes_dict: {'action': u'index', 'controller': u'changeset', 'revision
    ': u'856be614d9a4b565107c1def070ec95ca2b5acce', 'repo_name': u'rhodecode'}
      routes.route: <routes.route.Route object at 0x01F76AD0>
      routes.url: <routes.util.URLGenerator object at 0x02372730>
      webob._parsed_query_vars: (GET([]), '')
      webob.adhoc_attrs: {'language': 'en-us'}
      wsgi process: 'Multithreaded'
      wsgiorg.routing_args: (<routes.util.URLGenerator object at 0x02372730>, {'acti
    on': u'index', 'controller': u'changeset', 'revision': u'856be614d9a4b565107c1de
    f070ec95ca2b5acce', 'repo_name': u'rhodecode'})
    ------------------------------------------------------------
    

    I have "vcs-0.2.0" library installed which (seems) doesn't contains stat() into the DiffProcessor class. http://packages.python.org/vcs/api/utils/index.html#vcs.utils.diffs.DiffProcessor

    So I try to bypass this problem with

    st = (0, 0)
    
  3. Marcin Kuzminski repo owner

    Please update VCS library to latest tip since the stat function was introduced few revisions ago.

  4. Marc VILLETARD reporter

    I updated setup.py file with "vcs>=0.2.1" and didn't need to patch controllers/changeset.py anymore.

    Thanks you for support.

  5. Log in to comment