Downloading Subrepositories - Unknown revision.

Issue #332 resolved
Steven Turner created an issue

When downloading an archive of a repository from rhodecode with subrepositories I'm getting a failure. Repository is structured as follows:

{{{ #!shell

./Main-Repo (This is actually a "group" in rhodecode) drwxr-xr-x 7 paste users 4096 Jan 4 17:58 . drwxr-xr-x 8 paste paste 4096 Jan 4 17:30 .. drwxr-xr-x 3 paste users 4096 Jan 4 17:57 contrib (subrepo) drwxr-xr-x 3 paste users 4096 Jan 4 17:56 dep (This is a group as well) drwxr-xr-x 3 paste users 4096 Jan 4 17:57 doc (subrepo) drwxr-xr-x 3 paste users 4096 Jan 4 17:58 src (subrepo) drwxr-xr-x 7 paste users 4096 Jan 4 18:52 trunk (thin master repository to track all subs). }}}

Within trunk the hgsub looks as follows: {{{ doc = ../doc contrib = ../contrib dep/lib = ../dep/lib src = ../src }}}

substate as follows:

{{{ 0000000000000000000000000000000000000000 contrib 20f615bb5ce5e2f7714e83729c9ab0b7ad70f4a8 dep/lib dbd5cbd82e0bcd0271fb694acba18b4ad99ca23d doc 0000000000000000000000000000000000000000 src }}}

Revision on doc subrepo is: r1:dbd5cbd82e0b

Cloning, push, pull works successfully. However, when I attempt to download trunk with subrepos I get the following output in the logs: {{{ Error - <class 'mercurial.error.RepoLookupError'>: unknown revision 'dbd5cbd82e0bcd0271fb694acba18b4ad99ca23d' URL: https://repo.com:5000/OTH-RWR/trunk/archive/159473fefca68f4ab2d183fd88731ec76c939d18.tar.gz?subrepos=true File '/var/www/rhodecode-venv/lib/python2.6/site-packages/WebError-0.10.3-py2.6.egg/weberror/errormiddleware.py', line 162 in call app_iter = self.application(environ, sr_checker) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.2.3-py2.6.egg/rhodecode/lib/middleware/simplegit.py', line 106 in call return self.application(environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.2.3-py2.6.egg/rhodecode/lib/middleware/simplehg.py', line 71 in call return self.application(environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Beaker-1.5.4-py2.6.egg/beaker/middleware.py', line 152 in call return self.wrap_app(environ, session_start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py', line 131 in call response = self.app(environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py', line 107 in call response = self.dispatch(controller, environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py', line 312 in dispatch return controller(environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.2.3-py2.6.egg/rhodecode/lib/base.py', line 52 in call return WSGIController.call(self, environ, start_response) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 211 in call response = self.dispatch_call() File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 162 in _dispatch_call response = self._inspect_call(func) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 105 in _inspect_call result = self._perform_call(func, args) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 57 in _perform_call return func(args) File '<string>', line 2 in archivefile File '/var/www/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.2.3-py2.6.egg/rhodecode/lib/auth.py', line 408 in __wrapper return func(*fargs, fkwargs) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/RhodeCode-1.2.3-py2.6.egg/rhodecode/controllers/files.py', line 386 in archivefile cs.fill_archive(stream=t, kind=fileformat, subrepos=subrepos) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/vcs-0.2.2-py2.6.egg/vcs/backends/hg.py', line 704 in fill_archive kind, prefix=prefix, subrepos=subrepos) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/archival.py', line 282 in archive sub.archive(repo.ui, archiver, prefix) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/subrepo.py', line 401 in archive abstractsubrepo.archive(self, ui, archiver, prefix) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/subrepo.py', line 321 in archive files = self.files() File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/subrepo.py', line 513 in files ctx = self._repo[rev] File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/localrepo.py', line 202 in getitem return context.changectx(self, changeid) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/context.py', line 28 in init self._node = self._repo.lookup(changeid) File '/var/www/rhodecode-venv/lib/python2.6/site-packages/mercurial-1.9.3-py2.6-linux-i686.egg/mercurial/localrepo.py', line 553 in lookup raise error.RepoLookupError(("unknown revision '%s'") % key) RepoLookupError: unknown revision 'dbd5cbd82e0bcd0271fb694acba18b4ad99ca23d'

}}}

Comments (3)

  1. Marcin Kuzminski repo owner

    Dees archival with subrepos works from command line ? Please try to uprade mercurial to 2.0.XX series rhodecode works perfectly fine with 2.0.X and AFAIR there were some fixes for archiving subrepos

  2. Steven Turner reporter

    Changed the version requirements in rhodecode 1.2.3 to support >2.0 and then updated the mercurial site package to 2.0.2. Archival failed manually with hg commands.

    To resolve, recreated the repository locally on the rhodecode server by cloning the subrepositories into the master thin repository. ./hg/hgrc's did not point to a default path since I created the repositories in the rhodecode gui and then pushed the .hgsub file from a remote pachine.

    Archival working as expected now... apologies.

  3. Former user Account Deleted

    Sry, I did not understand your solution. Can you explain that a bit more?

    How does your structure looks now?

    Thank you

  4. Log in to comment