Homec4science

Added an intercept to Mercurial's `capabilities` command to remove bundle2.

Authored by Christopher Speck <die.drachen@gmail.com> on Oct 10 2015, 16:14.

Description

Added an intercept to Mercurial's capabilities command to remove bundle2.

Summary:
If Mercurial 3.4+ is used to host repositories in Phabricator, any clients using 3.5+ will receive an exception after the bundle is pushed up. Clients will also fail to update phases for changesets pushed up.

Before directly responding to mercurial clients with all capabilities, this change filters out the 'bundle2' capability so the client negotiates using a legacy bundle wire format instead.

Test Plan:
Server: Mercurial 3.5
Client: Mercurial 3.4

Test with both HTTP and SSH protocols:

  1. Create a local commit on client
  2. Push commit to server
  3. Verify the client emits something like:
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files

Closes T9450

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9450

Differential Revision: https://secure.phabricator.com/D14241

Details

Committed
epriestley <git@epriestley.com>Oct 10 2015, 16:14
Pushed
aubortJan 31 2017, 17:16
Parents
rPH3bccb0dcf2bc: Add custom Cows and Figlet directories to .gitignore
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH32d4ae8cb2cc: Added an intercept to Mercurial's `capabilities` command to remove bundle2. (authored by Christopher Speck <die.drachen@gmail.com>).Oct 10 2015, 16:14