Homec4science

Improve low-level branch resolution in Mercurial

Authored by epriestley <git@epriestley.com> on Apr 27 2015, 12:50.

Description

Improve low-level branch resolution in Mercurial

Summary:
Ref T7100. Ref T7108. Ref T6160. Several issues:

  • High load for mercurial repositories with huge numbers of branches (T7108).
    • In Mercurial, we resolve refs individually (one hg call per ref).
    • Each repository update also updates all refs, which requires resolving all of them.
    • For repositories with a huge number of branches,
  • We don't distinguish between closed branches (a Mercurial-only concept) and open branches (T6160).
    • In Git, when a branch is merged, it ceases to exist.
    • In Mercurial, when a branch is merged, it still exists, it's just "closed". Normally, no one cares about these branches.
    • In the low-level query, correctly identify which refs we resolve as branches.
    • In the low-level query, correctly mark closed branches as closed.
  • This marginally improves ref handling in general (see T7100).

Test Plan:
{F384366}

{F384367}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6160, T7108, T7100

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

Details

Committed
epriestley <git@epriestley.com>Apr 27 2015, 12:50
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7f43cde82dd1: Add a "refs" table to Diffusion
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH21c4aeb032cd: Improve low-level branch resolution in Mercurial (authored by epriestley <git@epriestley.com>).Apr 27 2015, 12:50