Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of squash and rebase of PRs #589

Closed
wants to merge 2 commits into from

Conversation

rwestberg
Copy link
Member

@rwestberg rwestberg commented Apr 17, 2020

Hi all,

Please review this change that improves how we perform squashing and rebasing before doing the final integration. Instead of using squash / rebase, simply merge the latest state of the target branch. Use the final state (tree) to create the commit, and specify the proper parents. This has the benefit of working for merge PRs as well.

Best regards,
Robin


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Reviewers

  • Erik Helin (ehelin - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/skara pull/589/head:pull/589
$ git checkout pull/589

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 17, 2020

👋 Welcome back rwestberg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@mlbridge
Copy link

mlbridge bot commented Apr 17, 2020

Webrevs

@kevinrushforth
Copy link
Member

kevinrushforth commented Apr 17, 2020

I presume that there will be no change in the commit that is produced for non-merge PRs?

@rwestberg
Copy link
Member Author

rwestberg commented Apr 20, 2020

Certainly, there will be no difference in what is committed, the actual commit object will just be generated more efficiently.

edvbld
edvbld approved these changes Apr 20, 2020
Copy link
Member

@edvbld edvbld left a comment

Wow @rwestberg, this PR is 🥳🎉 Very nice work to re-use the same logic for both regular squashed + rebased commits and for merge commits 👏

@openjdk
Copy link

openjdk bot commented Apr 20, 2020

@rwestberg This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

Improve handling of squash and rebase of PRs

Reviewed-by: ehelin
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 3 commits pushed to the master branch. As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 29691254ac27f7ef5f530b93f182b3b147bd4cd7.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Apr 20, 2020
@rwestberg
Copy link
Member Author

rwestberg commented Apr 20, 2020

/integrate

@openjdk openjdk bot closed this Apr 20, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Apr 20, 2020
@openjdk
Copy link

openjdk bot commented Apr 20, 2020

@rwestberg The following commits have been pushed to master since your change was applied:

  • 2969125: proxy: remove dead code
  • ec3635c: build: respect git's http.proxy setting
  • b60f393: skara: add aliases for publish and proxy

Your commit was automatically rebased without conflicts.

Pushed as commit 15cf5f6.

@mlbridge
Copy link

mlbridge bot commented Apr 20, 2020

Mailing list message from Robin Westberg on skara-dev:

Changeset: 15cf5f6
Author: Robin Westberg <rwestberg at openjdk.org>
Date: 2020-04-20 06:46:50 +0000
URL: https://git.openjdk.java.net/skara/commit/15cf5f69

Improve handling of squash and rebase of PRs

Reviewed-by: ehelin

! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/IntegrateCommand.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestInstance.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/SponsorCommand.java
! bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java
! bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java
! jcheck/src/test/java/org/openjdk/skara/jcheck/TestRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/ReadOnlyRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/Repository.java
+ vcs/src/main/java/org/openjdk/skara/vcs/Tree.java
! vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/hg/HgRepository.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants