Three project repos are giving errors when attempting to refresh the repo after a reclone: novatux's apps and hostedapps, and 's openerp-servercode. Example stack trace:
Traceback (most recent call last):
File "/var/local/env-allura/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.4.2', 'console_scripts', 'paster')()
File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 238, in run
result = self.command()
File "/var/local/allura/Allura/allura/command/reclone_repo.py", line 23, in command
self._clone_repo()
File "/var/local/allura/Allura/allura/command/reclone_repo.py", line 52, in _clone_repo
c.app.repo.init_as_clone(source_path, None, source_url)
File "/var/local/allura/Allura/allura/model/repository.py", line 222, in init_as_clone
self._impl.clone_from(source)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 106, in clone_from
self._repo.refresh(notify=False)
File "/var/local/allura/Allura/allura/model/repository.py", line 322, in refresh
refresh_repo(self, all_commits, notify)
File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 45, in refresh_repo
repo.refresh_commit_info(oid, seen, not all_commits)
File "/var/local/allura/Allura/allura/model/repository.py", line 198, in refresh_commit_info
return self._impl.refresh_commit_info(oid, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 206, in refresh_commit_info
self.refresh_tree_info(ci.tree, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
self.refresh_tree_info(o, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
self.refresh_tree_info(o, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
self.refresh_tree_info(o, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
self.refresh_tree_info(o, seen, lazy)
File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 218, in refresh_tree_info
for o in tree:
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/objects/tree.py", line 225, in __iter__
return self._iter_convert_to_object(self._cache)
File "/var/local/env-allura/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-x86_64.egg/gitdb/util.py", line 238, in __getattr__
self._set_cache_(attr)
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/objects/tree.py", line 144, in _set_cache_
ostream = self.repo.odb.stream(self.binsha)
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/db.py", line 42, in stream
hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(sha))
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 502, in stream_object_data
hexsha, typename, size = self.__get_object_header(cmd, ref)
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 474, in __get_object_header
return self._parse_object_header(cmd.stdout.readline())
File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 442, in _parse_object_header
raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip()))
ValueError: SHA could not be resolved, git returned: ''
(Logs can be found on sfu-scmprocess-1 at /var/log/allura/2012/09/19/.)
We need to try importing these repos on a sandbox and, if they work without error, possibly coordinate with siteops to do a full (clean) refresh on them.
Remote git repo to test init_as_clone with: git://novatux.git.sourceforge.net/gitroot/novatux/apps
Created #186: [#4999] ValueError: SHA could not be resolved, git returned: '' (1cp)
Related
Tickets:
#4999Closed #186.
The error does not reproduced for that repo on a local allura instance.
Diff:
After a reclone-repo and full clean refresh,
openerp-serveris fixed up and donenovatux'sappsrepo was up to date when I looked at it, and thehostedappsrepo appeared empty but the underlying git repo had everything, so I just did a regular refresh and it was all set.