Project

General

Profile

Actions

Bug #4136

closed

diff2way raises an error on empty files in SVN repos

Added by Marcin Kuzminski [CTO] over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
28.07.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

To reproduce:

  • create an empty file in an SVN repo
  • go to commit/file view and click "side-by-side diff observe error
URL: https://try.rhodecode.com/https-admin-try.rhodecode.com-kafka/diff-2way/zo?diff=diff&fulldiff=1&diff1=0000000000000000000000000000000000000000&diff2=1
Module weberror.errormiddleware:162 in __call__
<<              __traceback_supplement__ = Supplement, self, environ
                   sr_checker = ResponseStartChecker(start_response)
                   app_iter = self.application(environ, sr_checker)
                   return self.make_catching_iter(app_iter, environ, sr_checker)
               except:
>>  app_iter = self.application(environ, sr_checker)
Module routes.middleware:131 in __call__
<<                                               r'\1', oldpath)

               response = self.app(environ, start_response)

               # Wrapped in try as in rare cases the attribute will be gone already
>>  response = self.app(environ, start_response)
Module pylons.wsgiapp:103 in __call__
<<          controller = self.resolve(environ, start_response)
               response = self.dispatch(controller, environ, start_response)

               response_obj = callable(response)
>>  response = self.dispatch(controller, environ, start_response)
Module pylons.wsgiapp:313 in dispatch
<<          if log_debug:
                   log.debug("Calling controller class with WSGI interface")
               return controller(environ, start_response)

           def load_test_env(self, environ):
>>  return controller(environ, start_response)
Module rhodecode.lib.base:461 in __call__
<<                      url('my_account_password'), environ, start_response)

               return WSGIController.__call__(self, environ, start_response)
>>  return WSGIController.__call__(self, environ, start_response)
Module pylons.controllers.core:214 in __call__
<<                  return response(environ, self.start_response)

               response = self._dispatch_call()
               if not start_response_called:
                   self.start_response = start_response
>>  response = self._dispatch_call()
Module pylons.controllers.core:164 in _dispatch_call
<<              req.environ['pylons.action_method'] = func

                   response = self._inspect_call(func)
               else:
                   if log_debug:
>>  response = self._inspect_call(func)
Module pylons.controllers.core:107 in _inspect_call
<<                        func.__name__, args)
               try:
                   result = self._perform_call(func, args)
               except HTTPException, httpe:
                   if log_debug:
>>  result = self._perform_call(func, args)
Module pylons.controllers.core:57 in _perform_call
<<          """Hide the traceback for everything above this method"""
               __traceback_hide__ = 'before_and_this'
               return func(**args)

           def _inspect_call(self, func):
>>  return func(**args)
Module rhodecode.lib.auth:1896 in local_wrapper
<<      @wraps(func)
           def local_wrapper(*args, **kwds):
               return wrapper(func, *args, **kwds)
           local_wrapper.__wrapped__ = func
           return local_wrapper
>>  return wrapper(func, *args, **kwds)
Module rhodecode.lib.auth:1219 in __wrapper
<<              user.update_lastactivity()
                   Session().commit()
                   return func(*fargs, **fkwargs)
               else:
                   log.warning(
>>  return func(*fargs, **fkwargs)
Module rhodecode.lib.auth:1896 in local_wrapper
<<      @wraps(func)
           def local_wrapper(*args, **kwds):
               return wrapper(func, *args, **kwds)
           local_wrapper.__wrapped__ = func
           return local_wrapper
>>  return wrapper(func, *args, **kwds)
Module rhodecode.lib.auth:1329 in __wrapper
<<          if self.check_permissions(_user):
                   log.debug('Permission granted for %s %s', cls, _user)
                   return func(*fargs, **fkwargs)

               else:
>>  return func(*fargs, **fkwargs)
Module rhodecode.controllers.files:950 in diff_2way
<<                                  'between %(commit_1)s and %(commit_2)s.') % {
                                           'file_path': f_path,
                                           'commit_1': node1.commit.id,
                                           'commit_2': node2.commit.id
                                       }), category='error')
>>  'commit_1': node1.commit.id,
Module zope.cachedescriptors.property:69 in __get__
<<          func, name = self.data
               value = func(inst)
               inst.__dict__[name] = value
>>  value = func(inst)
Module rhodecode.lib.vcs.backends.base:686 in id
<<          Returns string identifying this commit.
               """
               raise NotImplementedError

           @LazyProperty
>>  raise NotImplementedError
NotImplementedError: 
CGI Variables
HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING    'gzip, deflate, sdch, br'
HTTP_ACCEPT_LANGUAGE    'en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4'
HTTP_CONNECTION 'close'
HTTP_COOKIE '_dc_gtm_UA-55639800-1=1; _ga=GA1.2.1576707776.1469699687; rhodecode=ee182c6c3c1dbe27f06da1b926ecf640d487b4cd478fd78558c447519236c0a43d13665b; _ga=GA1.3.1576707776.1469699687'
HTTP_HOST   'try.rhodecode.com'
HTTP_PROXY_HOST 'rc'
HTTP_REFERER    'https://try.rhodecode.com/https-admin-try.rhodecode.com-kafka/changeset/1'
HTTP_UPGRADE_INSECURE_REQUESTS  '1'
HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36'
HTTP_X_HOST 'try.rhodecode.com'
HTTP_X_REAL_IP  '101.230.198.106'
HTTP_X_URL_SCHEME   'https'
PATH_INFO   '/https-admin-try.rhodecode.com-kafka/diff-2way/zo'
QUERY_STRING    'diff=diff&fulldiff=1&diff1=0000000000000000000000000000000000000000&diff2=1'
RAW_URI '/https-admin-try.rhodecode.com-kafka/diff-2way/zo?diff=diff&fulldiff=1&diff1=0000000000000000000000000000000000000000&diff2=1'
REMOTE_ADDR '101.230.198.106'
REMOTE_PORT '44842'
REQUEST_METHOD  'GET'
SERVER_NAME '127.0.0.1'
SERVER_PORT '10002'
SERVER_PROTOCOL 'HTTP/1.0'
SERVER_SOFTWARE 'gunicorn/19.6.0'
WSGI Variables
application <routes.middleware.RoutesMiddleware object at 0x7fd2a509bed0>
beaker.session  {'csrf_token': '1296eb736ae5d3662a382eef76ea6ba8fdf1525d', '_creation_time': 1469699844.35442, '_accessed_time': 1469699921.730909}
gunicorn.socket <socket._socketobject object at 0x7fd2a0397d00>
paste.parsed_querystring    ([('diff', 'diff'), ('fulldiff', '1'), ('diff1', '0000000000000000000000000000000000000000'), ('diff2', '1')], 'diff=diff&fulldiff=1&diff1=0000000000000000000000000000000000000000&diff2=1')
paste.registry  <paste.registry.Registry object at 0x7fd2a0a91fd0>
paste.throw_errors  True
pylons.action_method    <bound method FilesController.diff_2way of <rhodecode.controllers.files.FilesController object at 0x7fd2a0a91790>>
pylons.controller   <rhodecode.controllers.files.FilesController object at 0x7fd2a0a91790>
pylons.environ_config   {'cache': 'beaker.cache', 'session': 'beaker.session'}
pylons.log_debug    True
pylons.pylons   <pylons.util.PylonsContext object at 0x7fd2a0a91650>
pylons.routes_dict  {'controller': u'files', 'action': u'diff_2way', 'repo_name': u'https-admin-try.rhodecode.com-kafka', 'f_path': u'zo'}
rc_auth_user    <AuthUser('id:1[default] ip:101.230.198.106 auth:True')>
routes.route    <routes.route.Route object at 0x7fd2a50eb590>
routes.url  <routes.util.URLGenerator object at 0x7fd2a0ce3650>
webob._parsed_cookies   ({u'_dc_gtm_UA-55639800-1': u'1', u'rhodecode': u'ee182c6c3c1dbe27f06da1b926ecf640d487b4cd478fd78558c447519236c0a43d13665b', u'_ga': u'GA1.3.1576707776.1469699687'}, '_dc_gtm_UA-55639800-1=1; _ga=GA1.2.1576707776.1469699687; rhodecode=ee182c6c3c1dbe27f06da1b926ecf640d487b4cd478fd78558c447519236c0a43d13665b; _ga=GA1.3.1576707776.1469699687')
webob._parsed_query_vars    (GET([(u'diff', u'diff'), (u'fulldiff', u'1'), (u'diff1', u'0000000000000000000000000000000000000000'), (u'diff2', u'1')]), 'diff=diff&fulldiff=1&diff1=0000000000000000000000000000000000000000&diff2=1')
wsgi process    'Multiprocess'
wsgi._org_proto 'https'
wsgi.file_wrapper   <class 'gunicorn.http.wsgi.FileWrapper'>
wsgiorg.routing_args    (<routes.util.URLGenerator object at 0x7fd2a0ce3650>, {'controller': u'files', 'action': u'diff_2way', 'repo_name': u'https-admin-try.rhodecode.com-kafka', 'f_path': u'zo'})
Actions

Also available in: Atom PDF