1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #463 duplicate

Crash if forking a repo using API

Roger Kratz
created an issue

If creating a repo ("create_repo") using the API and a clone_uri is set, the call crashes.

Or, maybe, is this a matter of which db is used (we're using sqlite)?

Stack trace 2012-05-29 15:30:51.358 ERROR [rhodecode.lib.utils] Traceback (most recent call last): File "c:\python27\lib\site-packages\rhodecode\lib\utils.py", line 156, in action_logger sa.commit() File "c:\python27\lib\site-packages\sqlalchemy\orm\scoping.py", line 113, in do return getattr(self.registry(), name)(args, *kwargs) File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 645, in commit self.transaction.commit() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 313, in commit self._prepare_impl() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 297, in _prepare_impl self.session.flush() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 1547, in flush self._flush(objects) File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 1616, in _flush flush_context.execute() File "c:\python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 328, in execute rec.execute(self) File "c:\python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 472, in execute uow File "c:\python27\lib\site-packages\sqlalchemy\orm\mapper.py", line 2291, in _save_obj execute(statement, params) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1405, in execute params) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1538, in _execute_clauseelement compiled_sql, distilled_params File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1646, in _execute_context context) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1639, in _execute_context context) File "c:\python27\lib\site-packages\sqlalchemy\engine\default.py", line 330, in do_execute cursor.execute(statement, parameters) OperationalError: (OperationalError) database is locked u'INSERT INTO user_logs (user_id, repository_id, repository_name, user_ip, action, action_date) VALUES (?, ?, ?, ?, ?, ?)' (1, 4, 'main', '172.22.6.85', 'pull', '2012-05-29 15:30:45.798000')

2012-05-29 15:30:51.358 ERROR [rhodecode.lib.middleware.simplehg] Traceback (most recent call last): File "c:\python27\lib\site-packages\rhodecode\lib\middleware\simplehg.py", line 165, in _handle_request return app(environ, start_response) File "c:\python27\lib\site-packages\mercurial\hgweb\hgweb_mod.py", line 91, in call return self.run_wsgi(req) File "c:\python27\lib\site-packages\mercurial\hgweb\hgweb_mod.py", line 127, 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 348, in dispatch return func(repo, proto, *args) File "c:\python27\lib\site-packages\mercurial\wireproto.py", line 449, in getbundle cg = repo.getbundle('serve', opts) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1801, in getbundle discovery.outgoing(cl, common, heads)) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1781, in getlocalbundle source) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1816, in _changegroupsubset return self._changegroup(csets, source) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1921, in _changegroup self.hook('preoutgoing', throw=True, source=source) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 266, in hook return hook.hook(self.ui, self, name, throw, args) File "c:\python27\lib\site-packages\mercurial\hook.py", line 173, in hook r = _pythonhook(ui, repo, name, hname, hookfn, args, throw) or r File "c:\python27\lib\site-packages\mercurial\hook.py", line 75, in _pythonhook r = obj(ui=ui, repo=repo, hooktype=name, args) File "c:\python27\lib\site-packages\rhodecode\lib\hooks.py", line 87, in log_pull_action commit=True) File "c:\python27\lib\site-packages\rhodecode\lib\utils.py", line 156, in action_logger sa.commit() File "c:\python27\lib\site-packages\sqlalchemy\orm\scoping.py", line 113, in do return getattr(self.registry(), name)(*args, kwargs) File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 645, in commit self.transaction.commit() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 313, in commit self._prepare_impl() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 297, in _prepare_impl self.session.flush() File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 1547, in flush self._flush(objects) File "c:\python27\lib\site-packages\sqlalchemy\orm\session.py", line 1616, in _flush flush_context.execute() File "c:\python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 328, in execute rec.execute(self) File "c:\python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 472, in execute uow File "c:\python27\lib\site-packages\sqlalchemy\orm\mapper.py", line 2291, in _save_obj execute(statement, params) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1405, in execute params) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1538, in _execute_clauseelement compiled_sql, distilled_params File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1646, in _execute_context context) File "c:\python27\lib\site-packages\sqlalchemy\engine\base.py", line 1639, in _execute_context context) File "c:\python27\lib\site-packages\sqlalchemy\engine\default.py", line 330, in do_execute cursor.execute(statement, parameters) OperationalError: (OperationalError) database is locked u'INSERT INTO user_logs (user_id, repository_id, repository_name, user_ip, action, action_date) VALUES (?, ?, ?, ?, ?, ?)' (1, 4, 'main', '172.22.6.85', 'pull', '2012-05-29 15:30:45.798000')

2012-05-29 15:30:51.358 ERROR [rhodecode.model.repo] Traceback (most recent call last): File "c:\python27\lib\site-packages\rhodecode\model\repo.py", line 285, in create form_data['clone_uri']) File "c:\python27\lib\site-packages\rhodecode\model\repo.py", line 458, in create_repo backend(repo_path, create=True, src_url=clone_uri) File "c:\python27\lib\site-packages\rhodecode\lib\vcs\backends\hg\repository.py", line 55, in init__ self._repo = self._get_repo(create, src_url, update_after_clone) File "c:\python27\lib\site-packages\rhodecode\lib\vcs\backends\hg\repository.py", line 313, in _get_repo clone(self.baseui, url, self.path, opts) File "c:\python27\lib\site-packages\mercurial\commands.py", line 1157, in clone branch=opts.get('branch')) File "c:\python27\lib\site-packages\mercurial\hg.py", line 350, in clone destrepo.clone(srcrepo, heads=revs, stream=stream) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 2265, in clone return self.pull(remote, heads) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1542, in pull heads=heads or rheads) File "c:\python27\lib\site-packages\mercurial\wireproto.py", line 289, in getbundle f = self._callstream("getbundle", opts) File "c:\python27\lib\site-packages\hgext\largefiles\proto.py", line 167, in httprepo_callstream return http_oldcallstream(self, cmd, args) File "c:\python27\lib\site-packages\mercurial\httprepo.py", line 117, in _callstream resp = self.urlopener.open(req) File "c:\python27\lib\urllib2.py", line 400, in open response = meth(req, response) File "c:\python27\lib\urllib2.py", line 513, in http_response 'http', request, response, code, msg, hdrs) File "c:\python27\lib\urllib2.py", line 438, in error return self._call_chain(args) File "c:\python27\lib\urllib2.py", line 372, in _call_chain result = func(args) File "c:\python27\lib\urllib2.py", line 521, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 500: Internal Server Error

2012-05-29 15:30:51.358 ERROR [rhodecode.controllers.api.api] Traceback (most recent call last): File "c:\python27\lib\site-packages\rhodecode\controllers\api\api.py", line 487, in create_repo owner File "c:\python27\lib\site-packages\rhodecode\model\repo.py", line 285, in create form_data['clone_uri']) File "c:\python27\lib\site-packages\rhodecode\model\repo.py", line 458, in create_repo backend(repo_path, create=True, src_url=clone_uri) File "c:\python27\lib\site-packages\rhodecode\lib\vcs\backends\hg\repository.py", line 55, in init__ self._repo = self._get_repo(create, src_url, update_after_clone) File "c:\python27\lib\site-packages\rhodecode\lib\vcs\backends\hg\repository.py", line 313, in _get_repo clone(self.baseui, url, self.path, opts) File "c:\python27\lib\site-packages\mercurial\commands.py", line 1157, in clone branch=opts.get('branch')) File "c:\python27\lib\site-packages\mercurial\hg.py", line 350, in clone destrepo.clone(srcrepo, heads=revs, stream=stream) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 2265, in clone return self.pull(remote, heads) File "c:\python27\lib\site-packages\mercurial\localrepo.py", line 1542, in pull heads=heads or rheads) File "c:\python27\lib\site-packages\mercurial\wireproto.py", line 289, in getbundle f = self._callstream("getbundle", opts) File "c:\python27\lib\site-packages\hgext\largefiles\proto.py", line 167, in httprepo_callstream return http_oldcallstream(self, cmd, args) File "c:\python27\lib\site-packages\mercurial\httprepo.py", line 117, in _callstream resp = self.urlopener.open(req) File "c:\python27\lib\urllib2.py", line 400, in open response = meth(req, response) File "c:\python27\lib\urllib2.py", line 513, in http_response 'http', request, response, code, msg, hdrs) File "c:\python27\lib\urllib2.py", line 438, in error return self._call_chain(args) File "c:\python27\lib\urllib2.py", line 372, in _call_chain result = func(args) File "c:\python27\lib\urllib2.py", line 521, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 500: Internal Server Error

Comments (1)

  1. Log in to comment