SVN doesn't like requesting logs for non-existent revisions

If revisions 1-130 exist, it errors at "svn log -r 1:250", so we can't
reliably give a last number. Easiest solution is to just forego per-batch
processing, and fetch all the unseen entries in one go.
This commit is contained in:
2016-08-31 15:59:27 +02:00
parent 0c9b31c4b4
commit 268a40092e
2 changed files with 4 additions and 12 deletions

View File

@@ -78,9 +78,7 @@ class TestCommitLogObserver(unittest.TestCase):
self.mock_client.log_default = mock.Mock(name='log_default', return_value=[])
self.observer.fetch_and_observe()
self.mock_client.log_default.assert_called_once_with(
revision_from=1,
revision_to=subversion.FETCH_AND_OBSERVE_CHUNK_SIZE)
self.mock_client.log_default.assert_called_once_with(revision_from=1)
# Should not have changed from the default.
self.assertEqual(self.observer.last_seen_revision, 0)
@@ -97,14 +95,10 @@ class TestCommitLogObserver(unittest.TestCase):
self.observer.last_seen_revision = 42
self.observer.fetch_and_observe()
self.mock_client.log_default.assert_called_with(
revision_from=43,
revision_to=42 + subversion.FETCH_AND_OBSERVE_CHUNK_SIZE)
self.mock_client.log_default.assert_called_with(revision_from=43)
self.observer.fetch_and_observe()
self.mock_client.log_default.assert_called_with(
revision_from=47,
revision_to=46 + subversion.FETCH_AND_OBSERVE_CHUNK_SIZE)
self.mock_client.log_default.assert_called_with(revision_from=47)
self.assertEqual(self.observer.last_seen_revision, 51)