moz-phab uplift rebases (all?) local branches when finished
Categories
(Conduit :: moz-phab, defect)
Tracking
(Not tracked)
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(2 files)
moz-phab version (from moz-phab --version): MozPhab 1.5.1 (Python 3.11.2, Linux)
(self-update says it's the latest version)
I started from a fresh worktree on an old, unrelated branch named phab.
I ran: moz-phab uplift fd62ec746f6d9^ 7be929915d43e --train esr128 (this is on a non-gecko-dev git-cinnabar clone)
After it created the phabricator diffs and revisions, it spun "Cleaning up" and was spending a lot of time doing that. I looked at the processes running, and noticed a git -c i18n.logOutputEncoding=UTF-8 -c i18n.commitEncoding=UTF-8 rebase --quiet --onto 256fe6960270eb8cafe9cb75cbb57dd9a8015325 7be929915d43e0b4881d4f81ad3735c0be893676 that was taking a lot of time to finish. 256fe6960270eb8cafe9cb75cbb57dd9a8015325 is not in the phab_uplift branch, but it looks like the rewritten tip of phab_uplift with Original Revision: added in.
Looking at the reflog, it appears moz-phab has been iterating branches, and rebased all of them on top of the rebased uplift. It eventually failed with an error error: pathspec '+ otherbranch' did not match any file(s) known to git, presumably because the branch appears with a + prefix in the git branch output (indicating it's checked out in another worktree), and that's not handled. If it had handled it, I suspect it would have rebased all the remaining branches too.
| Assignee | ||
Comment 1•1 year ago
|
||
It looks like this is done on purpose.
https://github.com/mozilla-conduit/review/blob/f6cc39df9b5f8a41b1e6e5c925dc5d676f7abe07/mozphab/git.py#L178-L186
| Assignee | ||
Comment 2•1 year ago
|
||
The error: pathspec '+ otherbranch' did not match any file(s) known to git error comes from https://github.com/mozilla-conduit/review/blob/f6cc39df9b5f8a41b1e6e5c925dc5d676f7abe07/mozphab/git.py#L160-L176 not handling the + prefix from git branch.
| Assignee | ||
Comment 3•1 year ago
|
||
When uplifting, we rebase the stack of commits on top of the branch
where patches are uplifted. Rebasing local branches that are on top of
the stack of commits to uplift on top of the rebased stack does not make
sense.
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
Connor, looks like this bug has accepted patches, can you please land it?
Comment 6•1 year ago
|
||
Done, the patches will be in the next moz-phab release.
Description
•