This is an archive of the discontinued Mercurial Phabricator instance.

bookmarks: keep bookmarks in .hg/store if new config set
ClosedPublic

Authored by martinvonz on May 16 2019, 2:28 AM.

Details

Summary

Bookmarks storage consists of two parts: (1) the set of bookmarks and
their positions, and (2) the current bookmark. The former can get
updated by exchange, while the latter cannot. However, they are both
stored in directly .hg/ and protected by repo.wlock(). As a result,
ugly workarounds were needed. This patch introduces a new config
option to store the set of bookmarks and their positions in .hg/store/
but still storing the current bookmark directory in .hg/. The config
option only takes effect at repo creation time. It results in a new
requirement being set.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.May 16 2019, 2:28 AM
This revision was automatically updated to reflect the committed changes.

I still need to look at this commit in detail, but any commit that alters the on-disk or on-network behavior of Mercurial should ideally be accompanied by a docs change to mercurial/help/internals. I say ideally because some things still aren't documented. But repo requirements are. Please follow up with a patch to document the new requirement in mercurial/help/internals/requirements.txt.

FWIW thank you for doing this. Bookmarks are logically part of the store and it has bothered me for some time that the file wasn't in .hg/store.