Page MenuHomePhabricator

Use a "branchmap" call to identify remote branches in "arc-hg"
ClosedPublic

Authored by epriestley on Jun 10 2020, 10:36 PM.
Tags
None
Referenced Files
F12860154: D21349.diff
Fri, Mar 29, 1:05 PM
Unknown Object (File)
Feb 4 2024, 12:20 AM
Unknown Object (File)
Jan 21 2024, 5:21 PM
Unknown Object (File)
Jan 6 2024, 8:36 PM
Unknown Object (File)
Dec 22 2023, 2:07 AM
Unknown Object (File)
Dec 20 2023, 5:08 AM
Unknown Object (File)
Nov 29 2023, 11:37 PM
Unknown Object (File)
Nov 25 2023, 11:46 PM
Subscribers
None

Details

Summary

Ref T9948. Ref T13546. To identify remote branch heads -- not just modified heads -- use "branchmap" like "hg outgoing" does.

I wasn't able to find any other way to get what we want: for example, with a bundlerepo, "peer.heads()" and "peer.changelog.heads()" include local branches which are not present in the remote.

It generally seems difficult (perhaps impossible?) to distinguish between these cases by using "getremotechanges()":

  • branch X exists at position Y in both the local and remote;
  • branch X exists at positino Y in the local, but not the remote.

In any case, this seems to work properly and should do less work than "getremotechanges()" since we don't need to pull as much data over the wire.

Test Plan

Ran "hg arc-ls-markers" in various repositories, got what appeared to be a faithful representation of the remote branch and bookmark state.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jun 11 2020, 12:31 AM
This revision was automatically updated to reflect the committed changes.