Closed Bug 1727344 Opened 2 years ago Closed 2 years ago

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


(Developer Services :: Mercurial:, defect)



(Not tracked)



(Reporter: sheehan, Assigned: sheehan)



(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
vcsreplicator: use phaseroots integer keys directly instead of implicit enumeration r=zeid
clonebundles: remove replicatesync logging message from test-clonebundles.t r=zeid

Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.