Mercurial > evolve
view tests/test-topic-issue6841.t @ 6655:81fe0a498447 stable
topic: internal config option to fix hg pick behavior (issue6406)
After some consideration, hg pick was made to always use current topic (and
topic namespace), even if it's not set, in which case the resulting changeset
will not have any topic.
Previously the intended behavior was to only update topic if there was an
active topic, and not touch commit extras at all otherwise. That wasn't ideal,
since pick doesn't change active topic, and amending the just-picked commit
would unset its topic without clear user's intent to do so and to their
surprise.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 27 Jan 2024 17:36:39 -0300 |
parents | 30d0d3d92c8d |
children | 6d22e9a596c4 |
line wrap: on
line source
New clones shouldn't have topics in any on-disk caches (issue6841) https://bz.mercurial-scm.org/show_bug.cgi?id=6841 $ . "$TESTDIR/testlib/common.sh" $ cat >> $HGRCPATH << EOF > [extensions] > topic = > [phases] > publish = no > [ui] > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" > EOF $ hg init orig $ hg clone orig publishing -q $ cat >> publishing/.hg/hgrc << EOF > [phases] > publish = yes > EOF $ cd orig $ mkcommit ROOT $ hg push ../publishing pushing to ../publishing searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files $ echo foo > foo $ hg topic topic-foo marked working directory as topic: topic-foo $ hg ci -qAm foo $ cd .. cloning via ssh to use wire protocol $ hg clone ssh://user@dummy/orig new-clone -q $ cd new-clone on-disk caches are using bare branch names only $ f -H .hg/cache/rbc-names-v1 .hg/cache/rbc-names-v1: 0000: 64 65 66 61 75 6c 74 |default| $ grep topic-foo .hg/cache/* [1] and pushing works fine $ hg push ssh://user@dummy/publishing pushing to ssh://user@dummy/publishing searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files $ cd ..