Closed Bug 1727344 Opened 3 months ago Closed 3 months ago

vcsreplicator incorrectly identifies phases present in a repo when sending pushkey message

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

Details

Attachments

(2 files)

Our pushkey/phases vcsreplicator hook is incorrectly identifying the phases present on a given repository when attempting to publish the pushkey message. This is evident by the failing test which is known to only have draft and public phases but fails with a message about only draft and public being supported phases.

Mercurial internals formerly defined phases via an expansion of range(3),
mapping the phases to each integer. Internally the integers are used so
the phases have an order (ie draft < public), but these phases are mapped
to names that we use in the Mercurial command line. At some point new phases
were added with their own unique values that break the range(3) standard.

In vcsreplicator we would read the phaseroots dict and enumerate the keys
to determine which phases are present on a given repo, however the presence
of the new phases breaks this assumption. Since the phaseroots object is
aleady a mapping of the phase integer representation to revision hash, we
should use the keys of the phaseroots mapping directly to determine which
phases are found on a given repo.

Depends on D123481

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/46841c29ca44
vcsreplicator: use phaseroots integer keys directly instead of implicit enumeration r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/177006efefb3
clonebundles: remove replicatesync logging message from test-clonebundles.t r=zeid

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.