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
Add topological merge bot #105
Conversation
|
Webrevs
|
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
Hi Jorn, thanks for the contribution! Just a quick suggestion after a brief look - how about moving |
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
While the code looks generally ok, I'd like to understand a bit more what it does (e.g. what the various API method translate to when it comes to Git, and what the actual behavior is in case of merge conflicts). Also there are some improvements on the topo sort handling.
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my understanding, git merge --abort is just fine here. This new command is the same - except for the --hard part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see - you also wanna recover from a failed push? [in which case the changeset is there and there is no further changes in the working tree]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik merge --abort
reverts any working tree changes, like conflicting file. reset --hard
actually resets the branch to a certain commit. We need the hard reset when the push fails, but the merge commit has already succeeded (i.e. there is nothing to abort).
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
This is starting to look very nice, just a few more comments!
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalSort.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalBot.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalSort.java
Outdated
Show resolved
Hide resolved
bots/topological/src/main/java/org/openjdk/skara/bots/topological/TopologicalSort.java
Outdated
Show resolved
Hide resolved
@JornVernee This change can now be integrated. The commit message will be:
Since the source branch of this PR was last updated there have been 4 commits pushed to the
Since there are no conflicts, your changes will automatically be rebased on top of the above commits when integrating. If you prefer to do this manually, please merge
|
/integrate |
This PR adds a bot that does a topological merge of the branches in a repo.
The branches can declare a dependencies file, which lists the branches that they depend on. This bot will crawl the branches, collect the dependencies for each branch, and topologically sort them based on their dependencies. Following that it will attempt to merge each dependency into the dependent in this order (this is mainly done so that we get less merges/failures if one of the root merges fails).
Branches that do not declare a dependency file implicitly depend on the master branch. Therefore the list of branches that the bot considers is passed in during configuration.
Aside from that, it also fixes a minor problem with
Repository::clone
on Windows.Progress
Approvers