feat: Add patchset history and diff support with cvsps integration
- Add cvsps package to Docker dependencies - Implement patchset retrieval and diff endpoints in API - Add _run_cvsps_command() helper for cvsps integration - Enhance file history parsing with log message extraction - Improve UI with enhanced styling and patchset functionality
This commit is contained in:
parent
c263092c10
commit
d3b40ae93f
9 changed files with 660 additions and 26 deletions
|
|
@ -143,7 +143,7 @@ class TestCVSClient(unittest.TestCase):
|
|||
|
||||
@patch('cvs_proxy.cvs_client.subprocess.run')
|
||||
def test_get_file_history(self, mock_run):
|
||||
"""Test retrieving file history"""
|
||||
"""Test retrieving file history using cvs log"""
|
||||
mock_run.return_value = MagicMock(
|
||||
stdout='''
|
||||
revision 1.2
|
||||
|
|
@ -160,6 +160,16 @@ date: 2023/11/19 15:30:00; author: testuser; state: Exp; lines: +10 -0
|
|||
self.assertEqual(len(history), 2)
|
||||
self.assertIn('revision', history[0])
|
||||
self.assertEqual(history[0]['revision'], '1.2')
|
||||
self.assertEqual(history[0]['author'], 'testuser')
|
||||
self.assertEqual(history[0]['date'], '2023/11/20 10:00:00')
|
||||
self.assertEqual(history[0]['state'], 'Exp')
|
||||
|
||||
# Verify the cvs log command was called correctly
|
||||
mock_run.assert_called()
|
||||
call_args = mock_run.call_args[0][0]
|
||||
self.assertEqual(call_args[0], 'cvs')
|
||||
self.assertIn('log', call_args)
|
||||
self.assertIn('file.txt', call_args)
|
||||
|
||||
@patch('cvs_proxy.cvs_client.subprocess.run')
|
||||
def test_get_file_content(self, mock_run):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue