Unit tests for revision ids stored along with diffs.
Review Request #2445 — Created June 29, 2011 and discarded
Unit tests for revision ids stored along with diffs.
This requires http://reviews.reviewboard.org/r/2094/ to be applied. Before adding the tests: Ran 434 tests in 399.912s FAILED (SKIP=6, errors=3) After adding test tests: Ran 436 tests in 354.798s FAILED (SKIP=6, errors=3) The remaining errors are believed to be due to the tests (ungraceful handling of lacking repository support). ====================================================================== ERROR: Testing a SFTP-backed bzr repository ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 261, in test_sftp self._test_ssh(self.bzr_sftp_path, 'README') File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 65, in _test_ssh tool.check_repository(repo_path) File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/bzr.py", line 221, in check_repository except NotBranchError, e: NameError: global name 'NotBranchError' is not defined ====================================================================== ERROR: Testing a SSH-backed bzr repository ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 253, in test_ssh self._test_ssh(self.bzr_ssh_path, 'README') File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 65, in _test_ssh tool.check_repository(repo_path) File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/bzr.py", line 221, in check_repository except NotBranchError, e: NameError: global name 'NotBranchError' is not defined ====================================================================== ERROR: Testing a SSH-backed bzr repository with a LocalSite ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 257, in test_ssh_with_site self._test_ssh_with_site(self.bzr_ssh_path, 'README') File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 98, in _test_ssh_with_site lambda: tool.get_file(filename, HEAD)); File "/usr/local/lib64/python2.6/site-packages/Django-1.3-py2.6.egg/django/utils/unittest/case.py", line 474, in assertRaises callableObj(*args, **kwargs) File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/tests.py", line 98, in <lambda> lambda: tool.get_file(filename, HEAD)); File "/home/ballarin/work/reviewboard/reviewboard3/reviewboard/scmtools/bzr.py", line 124, in get_file except BzrError, e: NameError: global name 'BzrError' is not defined ----------------------------------------------------------------------
BA
- Change Summary:
-
Updated patch to address issues from review.
- Diff:
-
Revision 2 (+129 -6)
BA
- Change Summary:
-
Patch 2 contained too much, I keep confusing git and mercurial workflows.
- Diff:
-
Revision 3 (+95 -1)
-
I had to revert this change. The raw SQL for updating every field ended up taking an eternity on even medium-sized deployments. The model will have to change to instead fall back on the existing field if the new one isn't populated. So instead of migrating anything, we'd have to insert the data for any new diffsets, but fetch the old field for existing ones.