RFR: 1431: The method TestPullRequest#diff sometimes returns wrong information [v2]

Guoxiong Li gli at openjdk.org
Mon Aug 22 13:32:41 UTC 2022


> Hi all,
> 
> The method `TestPullRequest#diff` always passes the head hash of the target branch to the method `Repository#diff` as the base hash. But it may be wrong when the target branch was submitted some new commits after creating the pull request. `TestPullRequest#diff` should find the last common hash of the source and target branch as the base hash.
> 
> This patch fixes the bug and adds the test case. I don't know whether it is good to place the test case at the class `CSRBotTests`, but the method `CSRBotTests#testBackportCsr` indeed contains the situation of this bug.
> 
> Thanks for taking the time to review.
> 
> Best Regards,
> -- Guoxiong

Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:

  Use the method 'metgeBase'.

-------------

Changes:
  - all: https://git.openjdk.org/skara/pull/1360/files
  - new: https://git.openjdk.org/skara/pull/1360/files/19b5f654..52a4d4f8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=skara&pr=1360&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1360&range=00-01

  Stats: 8 lines in 1 file changed: 0 ins; 7 del; 1 mod
  Patch: https://git.openjdk.org/skara/pull/1360.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1360/head:pull/1360

PR: https://git.openjdk.org/skara/pull/1360


More information about the skara-dev mailing list