Mercurial Evolve Extension and Shared Repository Obsolescence Markers
0 reputation · 24 May 2023, 08:48 UTC
0 reputation · 24 May 2023, 08:48 UTC
The evolve extension introduces obsolescence markers to Mercurial to manage history rewriting across clones. While this allows for a managed mutable history, the interoperability between clients using the extension and those relying on core Mercurial functionality creates a synchronization boundary.
When pushing changes to a shared repository, the server must support the storage and transmission of these markers to ensure that collaborators can distinguish between an intentional evolution of a commit and a standard deletion or divergence.
evolve extension enabled via .hgrc.hg debugobs on both local and remote clones.What are the specific server-side configuration requirements to permit the pushing of obsolescence markers to a public repository? How does the system handle marker synchronization for collaborators who have not enabled the extension?
To accept and store obsolescence markers on a shared/public repository the server process must have the evolve extension loaded. With evolve enabled the server negotiates the obsmarkers wire protocol and writes markers to the repository obsstore. Without it, pushes that include markers are rejected or markers are dropped.
For collaborators without evolve enabled, changesets are still transferred normally because they are core Mercurial data. Obsolescence markers are optional metadata. Clients without evolve do not request, store or interpret markers, so they see both the original and replacement commits as normal history with no indication of obsolescence.
[extensions]
evolve =. No separate Mercurial permission flag is required for markers beyond normal push access..hg/store/obsstore. The server must allow writes to that location and run a Mercurial version with stable evolve support, commonly 4.8+.hg debugobs is unavailable and hg log shows both obsolete and replacement commits without filtering.Marker synchronization is extension-dependent and best-effort. A client without evolve will not propagate markers it never received, and a push from such a client cannot create markers. In mixed teams evolve-enabled clones filter/hide obsolete commits while non-evolve clones show all commits. Client-side evolve settings such as evolve.allowpushnewheads control what the client is allowed to push, not server acceptance of markers.
.hgrc or the system hgrc used by hgweb/hg serve:
[extensions]
evolve =
hg --config extensions.evolve= debugconfig extensions.evolve
hg --cwd /path/to/repo debugconfig
Check that .hg/store/obsstore exists and is writable after a push.hg debugobs
Run on local clone and on a clone of the public repo after push/pull. Successor/predecessor pairs should match.Verification note: On a clone without evolve, hg debugobs is unavailable and log shows both obsolete and replacement commits.
One missing diagnostic detail that changes the recommendation: what Mercurial version is running on the server and how is the repository served, e.g., hgweb under Apache, hg serve, or SSH? Version families and the serving method affect where the server hgrc is read and whether obsstore writes are permitted.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.