Page MenuHomePhabricator

Allow branch deletions to be pushed in Mercurial
ClosedPublic

Authored by epriestley on May 14 2014, 5:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 4, 9:29 PM
Unknown Object (File)
Feb 17 2024, 6:24 AM
Unknown Object (File)
Feb 12 2024, 3:50 PM
Unknown Object (File)
Feb 12 2024, 6:56 AM
Unknown Object (File)
Feb 12 2024, 6:56 AM
Unknown Object (File)
Feb 12 2024, 6:56 AM
Unknown Object (File)
Feb 11 2024, 11:28 AM
Unknown Object (File)
Jan 31 2024, 5:17 PM
Subscribers

Details

Summary

Fixes T5050. This might not be 100% right in all edge cases, but it worked on everything I tried.

Test Plan
  • Pushed a branch deletion.
  • Pushed a branch creation.
  • Pushed a brnach creation + deletion.
  • Pushed a brnach deletion + creation.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Allow branch deletions to be pushed in Mercurial.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

Specifically, these are the possibly-improvable behaviors I caught:

  1. 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.
  2. 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.

This revision is now accepted and ready to land.May 14 2014, 7:05 PM
epriestley updated this revision to Diff 21680.

Closed by commit rP0ad0669916f3 (authored by @epriestley).