Mercurial > evolve
diff tests/test-topic.t @ 2718:b6fa7b3e13d4
topics: add a config knob to forbid untopiced commit
After this patch one can add the following to their hgrc to stop allowing new
commits with no topic on it.
[experimental]
enforce-topic = yes
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 06 Jul 2017 03:31:11 +0530 |
parents | ed45a5fb4452 |
children | d39942773163 |
line wrap: on
line diff
--- a/tests/test-topic.t Thu Jul 06 03:56:36 2017 +0530 +++ b/tests/test-topic.t Thu Jul 06 03:31:11 2017 +0530 @@ -820,3 +820,34 @@ t2: gamma t1: start on fran t0^ Add file delta (base) + + $ cd .. + +Testing the new config knob to forbid untopiced commit +====================================================== + + $ hg init ponky + $ cd ponky + $ cat <<EOF >> .hg/hgrc + > [phases] + > publish=false + > EOF + $ cat <<EOF >> $HGRCPATH + > [experimental] + > enforce-topic = yes + > EOF + $ touch a b c d + $ hg add a + $ hg ci -m "Added a" + abort: no active topic + (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) + [255] + $ hg ci -m "added a" --config experimental.enforce-topic=no + $ hg log + changeset: 0:a154386e50d1 + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added a + + $ cd ..