Add support for tracking topics as remote refs.#356
Open
riastradh wants to merge 1 commit intoglandium:masterfrom
Open
Add support for tracking topics as remote refs.#356riastradh wants to merge 1 commit intoglandium:masterfrom
riastradh wants to merge 1 commit intoglandium:masterfrom
Conversation
No Taskcluster jobs started for this pull requestThe |
NOTE: New tests will require the hg-evolve extension to be installed and available. This change does not yet update the CI logic to make that happen, so I expect the new tests will fail until it is updated. Like Mercurial branches, Mercurial topics are labels in the metadata of a changeset. While branches are meant for long-term history, topics are meant for short-term work-in-progress, like git feature branches for github pull requests. Once a topic is made public, the topic name is hidden by default. Each topic is associated with a branch; the fully-qualified name is written <branch>//<topic> when the branch is not implied. This adds a new option `topics' to the cinnabar.refs knob to expose topic T of branch B as any of - refs/heads/topics/<B>/<T> - refs/heads/topics/<B>/<T>/tip - refs/heads/topics/<B>/<T>/<SHA1> depending on whether `tips' or `heads' is included too. When cinnabar.refs has `topics' included, branch heads and bookmarks are also exposed under `refs/heads/branches/...' and `refs/heads/bookmarks/...' too like with certain other combinations of options. Topics are detected using essentially the same method by which branches are detected. Once a topic is published, the corresponding refs/heads/topics/* refs will vanish. When the remote hg server advertises support with the `topics-namespaces' extension, use the `branchmaptns' rather than `branchmap' cmd to query the remote heads so we can distinguish between topics and branches. By default, cinnabar.refs does not have `topics' included, so there is no change to the semantics. fix glandium#326
932e55b to
f73dbda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: New tests will require the hg-evolve extension to be installed and available. This change does not yet update the CI logic to make that happen, so I expect the new tests will fail until it is updated.
Like Mercurial branches, Mercurial topics are labels in the metadata of a changeset. While branches are meant for long-term history, topics are meant for short-term work-in-progress, like git feature branches for github pull requests. Once a topic is made public, the topic name is hidden by default. Each topic is associated with a branch; the fully-qualified name is written
<branch>//<topic>when the branch is not implied.This adds a new option 'topics' to the cinnabar.refs knob to expose topic T of branch B as any of
refs/heads/topics/<B>/<T>refs/heads/topics/<B>/<T>/tiprefs/heads/topics/<B>/<T>/<SHA1>depending on whether 'tips' or 'heads' is included too. When cinnabar.refs has 'topics' included, branch heads and bookmarks are also exposed under 'refs/heads/branches/...' and
'refs/heads/bookmarks/...' too like with certain other combinations of options.
Topics are detected using essentially the same method by which branches are detected. Once a topic is published, the corresponding refs/heads/topics/* refs will vanish.
When the remote hg server advertises support with the 'topics-namespaces' extension, use the 'branchmaptns' rather than 'branchmap' cmd to query the remote heads so we can distinguish between topics and branches.
By default, cinnabar.refs does not have 'topics' included, so there is no change to the semantics.
fix #326