Mercurial > evolve
diff tests/test-topicmode.t @ 3024:89855920fb0f
topicmode: 'enforce' topic mode, no longer warn about untopiced merge
merging a topic back in a branch is common case, it seems sensible to not pester
the user about it.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 30 Sep 2017 23:18:29 +0100 |
parents | cc740c545776 |
children | e814c553ef32 |
line wrap: on
line diff
--- a/tests/test-topicmode.t Sat Sep 30 23:00:21 2017 +0100 +++ b/tests/test-topicmode.t Sat Sep 30 23:18:29 2017 +0100 @@ -66,3 +66,65 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: added a' + +Testing the new config knob to warn about untopiced merge commit +================================================================ + + $ hg init $TESTTMP/test-untopic-merge-commit + $ cd $TESTTMP/test-untopic-merge-commit + $ cat <<EOF >> .hg/hgrc + > [phases] + > publish=false + > EOF + $ cat <<EOF >> $HGRCPATH + > [experimental] + > topic-mode = enforce + > EOF + $ touch ROOT + $ hg commit -A -m "ROOT" --config experimental.topic-mode=off + adding ROOT + $ touch a + $ hg add a + $ hg topic mytopic + marked working directory as topic: mytopic + $ hg ci -m "Added a" + active topic 'mytopic' grew its first changeset + + $ hg up -r "desc('ROOT')" + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ touch default + $ hg add default + $ hg commit -m "default" --config experimental.topic-mode=off + + $ hg merge mytopic + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + $ hg commit -m "merge mytopic" + warning: new draft commit without topic + + $ hg log -G + @ changeset: 3:676a445d1c09 + |\ tag: tip + | | parent: 2:a4da109ee59f + | | parent: 1:e5b6c632bd8e + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | summary: merge mytopic + | | + | o changeset: 2:a4da109ee59f + | | parent: 0:ec1d2790416d + | | user: test + | | date: Thu Jan 01 00:00:00 1970 +0000 + | | summary: default + | | + o | changeset: 1:e5b6c632bd8e + |/ topic: mytopic + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: Added a + | + o changeset: 0:ec1d2790416d + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: ROOT +