Update on the topic experiment
pierre-yves.david at ens-lyon.org
Fri Mar 18 00:22:31 EDT 2016
Good new everyone, some advance on the topic experiment front,
I manage to take some time during the last few days to bring a new set
of feature/behavior to this experiment. The whole things is very hacky
but it should give us a good idea of where this could be going. The UI
is quite rough but that was not really the initial focus. Evolve have
also been updated to collaborate more closely with topic too. This is
at "proof of concept" stage and already contains various known bugs.
For example, all commit will issue the "create a new head" warning.
By some miracle, this is compatible with both Mercurial 3.7 and the
current tip of default. But future iteration version will likely be
compatible with the tip of default only (future 3.8)
The code can be find here: http://hg.netv6.net/topic
We'll try to publish an official numbered version (for both topic and
Here is quick run down on topic features and behaviors:
What existed before this iteration?
- "hg topic NAME" activates a topic to be used for all subsequent
- "hg topic" lists all existing topics (and flag the active one)
- "hg up NAME" brings you to the tip most changeset in the topic (and
activate the topic)
- The "topic(NAME)" revset selects all changesets on a topic.
- "hg up BRANCHNAME" now brings you to the tipmost changeset of a
branch with no attached topic. (same for hg log BRANCHNAME, etc)
- When you have no active topic:
- bare "hg update" will bring you to the tipmost changeset (on the
same branch) with no topic.
- bare "hg update" will not warn about other heads with a topic.
- default merge and rebase destination will ignore heads with a
- If you have an active topic.
- bare "hg update" will bring you to the tipmost change with this
- default merge and rebase destination will be first other head
topic, then head of the current branch without a topic,
- default histedit destination will not go further than your
- "hg push" to a non-publishing server (with topic support) will not
requires --force to push new head with a topic (As long as you
stick to one head per topic.
- "hg topic --list" will give you compact list of all changesets in
your topic. This is close to 'hg log -r topic(.)' would do, but it
filter out obsolete one and make sure they are displayed in the
right other even in the unstability case. The list highlight the
current working copy parent and show what part of the stack is
- Index of changeset in "hg topic --list" can be use to refer to
changeset in the current topic. "hg up t2" will bring you to the
3rd changeset in the stack (3rd, because of lazyness and zero
- The changeset in that command can be retrieved using using the
"stack()" revset. The special ordering is preserved.
What happened on the evolve front?
- "hg evolve" now properly preserves topic of the source changesets.
- If you have an active topic "hg evolve --all" will select all
changesets in the topic for resolution.
- "hg prev" and "hg next" will stay within the active topic by
More information about the Mercurial-devel