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

[upload] rebase detection does not propagate PUSHED back down a related graph #163

Open
jerry-skydio opened this issue Mar 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jerry-skydio
Copy link
Collaborator

Have a graph of related PRs with several branches. Rebase the whole thing, then modify one of the leaves. We should be marking the whole graph as PUSH but currently only do that for one branch because this loop only goes backwards, not forwards

                while cur_topic is not None:
                    cur_review = cur_topic.reviews[base_branch]
                    if cur_review.push_status == PushStatus.REBASE:
                        cur_review.push_status = PushStatus.PUSHED
                        if cur_review.status == PrStatus.MERGED:
                            # User has changed the base of an already merged commit, but hasn't
                            # moved forward enough such that the commit would be dropped. There
                            # isn't any way for us to handle this that wouldn't potentially
                            # generate a conflict or show the incorrect commit diff. We settle
                            # with showing the wrong diff and warning the user.
                            # This should be relatively uncommon
                            logging.warning(
                                f"Attempted to rebase an already merged PR {cur_topic.name}"
                            )
                            logging.warning("'git pull' and upload again to fix this.")

                        cur_topic = cur_topic.relative_topic
                    else:
                        break
                    ```
@jerry-skydio jerry-skydio added the bug Something isn't working label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant