Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egerrit-dev] Steps to local rebase

We are thinking about helping the user perform local rebases, when the remote rebase fails. The idea is that when the gerrit server fails at performing the remote rebase, we would like to start a local rebase and perform as many steps as possible.

In the best situations, after the local rebase completes, the user would just have to review the result of the rebase in the staging view and push it. Though we could automate the commit and push, we think it is best to not do it automatically so the user gets a chance to review the result.

In order to make sure we perform the best steps possible, here is the approach we are thinking about:

Case of a review w/o depending review
- (remote rebase fails)
- Fetch the content of the targeted branch
- Checkout the targeted branch into a newly created local branch (e.g. named rebase-<review>-<revision>)
- Cherry-pick the most recent revision onto the previously created branch

Case of a review w depending reviews
- (remote rebase fails)
- Checkout the immediate depending review into a newly created local branch (e.g. named rebase-<review>-<revision>)
- Cherry-pick the most recent revision onto the previously created branch

Does this cover all the cases, does this match your workflows?

Thanks for your input,

Pascal




Back to the top