forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request buildbot#7760 from tdesveaux/gitpoller/fix-merges
Gitpoller: fix merges processing
- Loading branch information
Showing
3 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,16 @@ def test_get_commit_files(self): | |
filesRes = ['file1', 'file2', 'file_octal', 'file space'] | ||
return self._perform_git_output_test( | ||
self.poller._get_commit_files, | ||
['log', '--name-only', '--no-walk', '--format=%n', self.dummyRevStr, '--'], | ||
[ | ||
'log', | ||
'--name-only', | ||
'--no-walk', | ||
'--format=%n', | ||
'-m', | ||
'--first-parent', | ||
self.dummyRevStr, | ||
'--', | ||
], | ||
filesBytes, | ||
filesRes, | ||
emptyRaisesException=False, | ||
|
@@ -194,7 +203,16 @@ def test_get_commit_files_with_space_in_changed_files(self): | |
filesStr = bytes2unicode(filesBytes) | ||
return self._perform_git_output_test( | ||
self.poller._get_commit_files, | ||
['log', '--name-only', '--no-walk', '--format=%n', self.dummyRevStr, '--'], | ||
[ | ||
'log', | ||
'--name-only', | ||
'--no-walk', | ||
'--format=%n', | ||
'-m', | ||
'--first-parent', | ||
self.dummyRevStr, | ||
'--', | ||
], | ||
filesBytes, | ||
[l for l in filesStr.splitlines() if l.strip()], | ||
emptyRaisesException=False, | ||
|
@@ -387,6 +405,7 @@ def test_poll_failLog(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
|
@@ -470,6 +489,7 @@ def test_poll_nothingNew(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -580,6 +600,7 @@ def test_poll_multipleBranches(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^bf0b01df6d00ae8d1ffa0b2e2acbe642a6cd35d5', | ||
|
@@ -604,6 +625,7 @@ def test_poll_multipleBranches(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'9118f4ab71963d23d02d4bdc54876ac8bf05acf2', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -741,6 +763,7 @@ def test_poll_multipleBranches_buildPushesWithNoCommits_default(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -793,6 +816,7 @@ def test_poll_multipleBranches_buildPushesWithNoCommits_true(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -892,6 +916,7 @@ def test_poll_multipleBranches_buildPushesWithNoCommits_true_fast_forward(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^0ba9d553b7217ab4bbad89ad56dc0332c7d57a8c', | ||
|
@@ -995,6 +1020,7 @@ def test_poll_multipleBranches_buildPushesWithNoCommits_true_not_tip(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^0ba9d553b7217ab4bbad89ad56dc0332c7d57a8c', | ||
|
@@ -1090,6 +1116,7 @@ def test_poll_allBranches_single(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
|
@@ -1200,6 +1227,7 @@ def test_poll_noChanges(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -1247,6 +1275,7 @@ def test_poll_allBranches_multiple(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^bf0b01df6d00ae8d1ffa0b2e2acbe642a6cd35d5', | ||
|
@@ -1271,6 +1300,7 @@ def test_poll_allBranches_multiple(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'9118f4ab71963d23d02d4bdc54876ac8bf05acf2', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -1378,6 +1408,7 @@ def test_poll_callableFilteredBranches(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^bf0b01df6d00ae8d1ffa0b2e2acbe642a6cd35d5', | ||
|
@@ -1489,6 +1520,7 @@ def test_poll_branchFilter(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'9118f4ab71963d23d02d4bdc54876ac8bf05acf2', | ||
'^bf0b01df6d00ae8d1ffa0b2e2acbe642a6cd35d5', | ||
|
@@ -1595,6 +1627,7 @@ def test_poll_old(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
|
@@ -1709,6 +1742,7 @@ def test_poll_callableCategory(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
'^fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
|
@@ -1833,6 +1867,7 @@ def test_startService_loadLastRev(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
'^fa3ae8ed68e664d4db24798611b352e3c6509930', | ||
|
@@ -1943,6 +1978,7 @@ async def test_poll_found_head(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'737b94eca1ddde3dd4a0040b25c8a25fe973fe09', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -1993,6 +2029,7 @@ async def test_poll_found_head_not_found(self): | |
'git', | ||
'log', | ||
'--ignore-missing', | ||
'--first-parent', | ||
'--format=%H', | ||
'737b94eca1ddde3dd4a0040b25c8a25fe973fe09', | ||
'^4423cdbcbb89c14e50dd5f4152415afd686c5241', | ||
|
@@ -2657,30 +2694,14 @@ async def test_poll_from_last(self): | |
'src': 'git', | ||
'when_timestamp': 1717855320, | ||
}, | ||
{ | ||
'author': 'test user <[email protected]>', | ||
'branch': 'main', | ||
'category': None, | ||
'codebase': None, | ||
'comments': 'Feature 1', | ||
'committer': 'test user <[email protected]>', | ||
'files': ['README.md'], | ||
'project': '', | ||
'properties': {}, | ||
'repository': self.repo_url, | ||
'revision': self.FEATURE_1_SHA, | ||
'revlink': '', | ||
'src': 'git', | ||
'when_timestamp': 1717855380, | ||
}, | ||
{ | ||
'author': 'test user <[email protected]>', | ||
'branch': 'main', | ||
'category': None, | ||
'codebase': None, | ||
'comments': "Merge branch 'feature/1'", | ||
'committer': 'test user <[email protected]>', | ||
'files': [], | ||
'files': ['README.md'], | ||
'project': '', | ||
'properties': {}, | ||
'repository': self.repo_url, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix ``GitPoller`` merge commit processing. ``GitPoller`` now correctly list merge commit files. (:issue:`7494`) |