Fixes T5050. This might not be 100% right in all edge cases, but it worked on everything I tried.
Details
Details
- Reviewers
btrahan - Maniphest Tasks
- T5050: Cannot Push Branch Close Commits to Hosted Mercurial Repositories
- Commits
- Restricted Diffusion Commit
rP0ad0669916f3: Allow branch deletions to be pushed in Mercurial
- Pushed a branch deletion.
- Pushed a branch creation.
- Pushed a brnach creation + deletion.
- Pushed a brnach deletion + creation.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Specifically, these are the possibly-improvable behaviors I caught:
- When a push deletes, then creates a branch, we get an APPEND (or maybe an ADD, depending?) operation but at least one should probably be REWRITE. The change itself is recorded correctly. This is complicated and a bit muddy because Mercurial branches aren't quite the same as Git branches. See note inline.
- When a push creates, then deletes a branch (in the same transaction) it doesn't record anything about the branch, since the end state has no effect. Possibly we should try to record this as a 0 => 0 rewrite, or several operations or something. The current behavior seems arguably correct, since the transaction generally records overall results and this is a net no-op.
In both cases I'm inclined to wait for more issues before dealing with them. This one actually blocks legitimate use cases, those are just janitorial.