# HG changeset patch # User Pierre-Yves David # Date 1508530934 -7200 # Node ID 7518ff7f26da5db24729a9c007094a2c81a0ad65 # Parent 50be10c63825dd0b590c4a8ec44b1860fe93b5fb compat-test: remove topic related tests for 3.9 The extension is no longer supported for 3.9 diff --git a/tests/test-topic-change.t b/tests/test-topic-change.t deleted file mode 100644 --- a/tests/test-topic-change.t +++ /dev/null @@ -1,368 +0,0 @@ -Tests for changing and clearing topics -====================================== - - $ . "$TESTDIR/testlib/topic_setup.sh" - $ cat <> $HGRCPATH - > [experimental] - > # disable the new graph style until we drop 3.7 support - > graphstyle.missing = | - > evolution=createmarkers, allowunstable - > [phases] - > publish=false - > [alias] - > glog = log -G -T "{rev}:{node|short} \{{topics}}\n{desc} ({bookmarks})\n\n" - > EOF - -About the glog output: {} contains the topic name and () will contain the bookmark - -Setting up a repo ----------------- - - $ hg init topics - $ cd topics - $ for ch in a b c d e f g h; do touch $ch; echo "foo" >> $ch; hg ci -Aqm "Added "$ch; done - - $ hg glog - @ 7:ec2426147f0e {} - | Added h () - | - o 6:87d6d6676308 {} - | Added g () - | - o 5:825660c69f0c {} - | Added f () - | - o 4:aa98ab95a928 {} - | Added e () - | - o 3:62615734edd5 {} - | Added d () - | - o 2:28ad74487de9 {} - | Added c () - | - o 1:29becc82797a {} - | Added b () - | - o 0:18d04c59bb5d {} - Added a () - - -Clearing topic from revision without topic - - $ hg topic -r . --clear - changed topic on 0 changes - -Clearing current topic when no active topic is not error - - $ hg topic - $ hg topic --clear - -Setting topics to all the revisions - - $ hg topic -r 0:: foo - switching to topic foo - changed topic on 8 changes - $ hg glog - @ 15:05095f607171 {foo} - | Added h () - | - o 14:97505b53ab0d {foo} - | Added g () - | - o 13:75a8360fe626 {foo} - | Added f () - | - o 12:abcedffeae90 {foo} - | Added e () - | - o 11:1315a3808ed0 {foo} - | Added d () - | - o 10:1fa891977a22 {foo} - | Added c () - | - o 9:a53ba98dd6b8 {foo} - | Added b () - | - o 8:86a186070af2 {foo} - Added a () - - -Clearing the active topic using --clear - - $ hg topic - * foo (8 changesets) - $ hg topic --clear - $ hg topic - foo (8 changesets) -Changing topics on some revisions (also testing issue 5441) - - $ hg topic -r 12:: bar - switching to topic bar - changed topic on 4 changes - $ hg glog - @ 19:d7d36e193ea7 {bar} - | Added h () - | - o 18:e7b418d79a05 {bar} - | Added g () - | - o 17:82e0b14f4d9e {bar} - | Added f () - | - o 16:edc4a6b9ea60 {bar} - | Added e () - | - o 11:1315a3808ed0 {foo} - | Added d () - | - o 10:1fa891977a22 {foo} - | Added c () - | - o 9:a53ba98dd6b8 {foo} - | Added b () - | - o 8:86a186070af2 {foo} - Added a () - - -Changing topics without passing topic name and clear - - $ hg topic -r . - abort: changing topic requires a topic name or --clear - [255] - -Changing topic using --current flag - - $ hg topic foobar - $ hg topic -r . --current - active topic 'foobar' grew its first changeset - changed topic on 1 changes - $ hg glog -r . - @ 20:c2d6b7df5dcf {foobar} - | Added h () - | - -Changing topic in between the stack - - $ hg topic -r 9::10 --current - changed topic on 2 changes - $ hg glog - o 22:1b88140feefe {foobar} - | Added c () - | - o 21:c39cabfcbbf7 {foobar} - | Added b () - | - | @ 20:c2d6b7df5dcf {foobar} - | | Added h () - | | - | o 18:e7b418d79a05 {bar} - | | Added g () - | | - | o 17:82e0b14f4d9e {bar} - | | Added f () - | | - | o 16:edc4a6b9ea60 {bar} - | | Added e () - | | - | o 11:1315a3808ed0 {foo} - | | Added d () - | | - | x 10:1fa891977a22 {foo} - | | Added c () - | | - | x 9:a53ba98dd6b8 {foo} - |/ Added b () - | - o 8:86a186070af2 {foo} - Added a () - - $ hg rebase -s 11 -d 22 - rebasing 11:1315a3808ed0 "Added d" - switching to topic foo - rebasing 16:edc4a6b9ea60 "Added e" - switching to topic bar - rebasing 17:82e0b14f4d9e "Added f" - rebasing 18:e7b418d79a05 "Added g" - rebasing 20:c2d6b7df5dcf "Added h" - switching to topic foobar - - $ hg glog - @ 27:a1a9465da59b {foobar} - | Added h () - | - o 26:7c76c271395f {bar} - | Added g () - | - o 25:7f26084dfaf1 {bar} - | Added f () - | - o 24:b1f05e9ba0b5 {bar} - | Added e () - | - o 23:f9869da2286e {foo} - | Added d () - | - o 22:1b88140feefe {foobar} - | Added c () - | - o 21:c39cabfcbbf7 {foobar} - | Added b () - | - o 8:86a186070af2 {foo} - Added a () - -Amending a topic ----------------- - -When the changeset has a topic and we have different active topic - - $ hg topic wat - $ hg ci --amend - active topic 'wat' grew its first changeset - $ hg glog -r . - @ 29:61470c956807 {wat} - | Added h () - | - -Clear the current topic and amending - - $ hg topic --clear - $ hg ci --amend - $ hg glog -r . - @ 31:b584fa49f42e {} - | Added h () - | - -When the changeset does not has a topic but we have an active topic - - $ hg topic watwat - marked working directory as topic: watwat - $ hg ci --amend - active topic 'watwat' grew its first changeset - $ hg glog -r . - @ 33:a24c31c35013 {watwat} - | Added h () - | - -Testing changing topics on public changeset -------------------------------------------- - - $ hg phase -r 8 -p - -Clearing the topic - - $ hg topic -r 8 --clear - abort: can't change topic of a public change - [255] - -Changing the topic - - $ hg topic -r 8 foobarboo - abort: can't change topic of a public change - [255] - -Testing the bookmark movement ------------------------------ - - $ hg bookmark book - $ hg glog - @ 33:a24c31c35013 {watwat} - | Added h (book) - | - o 26:7c76c271395f {bar} - | Added g () - | - o 25:7f26084dfaf1 {bar} - | Added f () - | - o 24:b1f05e9ba0b5 {bar} - | Added e () - | - o 23:f9869da2286e {foo} - | Added d () - | - o 22:1b88140feefe {foobar} - | Added c () - | - o 21:c39cabfcbbf7 {foobar} - | Added b () - | - o 8:86a186070af2 {} - Added a () - -On clearing the topic - - $ hg topic -r . --clear - clearing empty topic "watwat" - active topic 'watwat' is now empty - changed topic on 1 changes - - $ hg glog - @ 34:c48d6d71b2d9 {} - | Added h () - | - | x 33:a24c31c35013 {watwat} - |/ Added h (book) - | - o 26:7c76c271395f {bar} - | Added g () - | - o 25:7f26084dfaf1 {bar} - | Added f () - | - o 24:b1f05e9ba0b5 {bar} - | Added e () - | - o 23:f9869da2286e {foo} - | Added d () - | - o 22:1b88140feefe {foobar} - | Added c () - | - o 21:c39cabfcbbf7 {foobar} - | Added b () - | - o 8:86a186070af2 {} - Added a () - - -On changing the topic - - $ hg bookmark bookboo - $ hg topic -r . movebook - switching to topic movebook - changed topic on 1 changes - $ hg glog - @ 35:1b83d11095b9 {movebook} - | Added h () - | - | x 34:c48d6d71b2d9 {} - |/ Added h (bookboo) - | - | x 33:a24c31c35013 {watwat} - |/ Added h (book) - | - o 26:7c76c271395f {bar} - | Added g () - | - o 25:7f26084dfaf1 {bar} - | Added f () - | - o 24:b1f05e9ba0b5 {bar} - | Added e () - | - o 23:f9869da2286e {foo} - | Added d () - | - o 22:1b88140feefe {foobar} - | Added c () - | - o 21:c39cabfcbbf7 {foobar} - | Added b () - | - o 8:86a186070af2 {} - Added a () - diff --git a/tests/test-topic-mode.t b/tests/test-topic-mode.t deleted file mode 100644 --- a/tests/test-topic-mode.t +++ /dev/null @@ -1,330 +0,0 @@ - $ . "$TESTDIR/testlib/topic_setup.sh" - -Testing the config knob to forbid untopiced commit -====================================================== - - $ hg init $TESTTMP/untopic-commit - $ cd $TESTTMP/untopic-commit - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = enforce - > EOF - $ touch a b c d - $ hg add a - $ hg ci -m "Added a" - abort: no active topic - (see 'hg help -e topic.topic-mode' for details) - [255] - -(same test, checking we abort before the editor) - - $ EDITOR=cat hg ci -m "Added a" --edit - abort: no active topic - (see 'hg help -e topic.topic-mode' for details) - [255] - $ hg ci -m "added a" --config experimental.topic-mode=ignore - $ hg log - changeset: 0:a154386e50d1 - tag: tip - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: added a - - -Testing the config knob to warn about untopiced commit -========================================================== - - $ hg init $TESTTMP/untopic-warn-commit - $ cd $TESTTMP/untopic-warn-commit - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = warning - > EOF - $ touch a b c d - $ hg add a - -(same test, checking we abort before the editor) - - $ HGEDITOR=cat hg ci -m "Added a" --edit - warning: new draft commit without topic - (see 'hg help -e topic.topic-mode' for details) - Added a - - - HG: Enter commit message. Lines beginning with 'HG:' are removed. - HG: Leave message empty to abort commit. - HG: -- - HG: user: test - HG: branch 'default' - HG: added a - - $ HGEDITOR=cat hg ci --amend -m "Added a" --edit - Added a - - - HG: Enter commit message. Lines beginning with 'HG:' are removed. - HG: Leave message empty to abort commit. - HG: -- - HG: user: test - HG: branch 'default' - HG: added a - $ hg ci --amend -m "added a'" --config experimental.topic-mode=ignore - $ hg log - changeset: 2:2e862d8b5eff - tag: tip - parent: -1:000000000000 - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: added a' - - -Testing the config knob to warn about untopiced merge commit -================================================================ - - $ hg init $TESTTMP/test-untopic-merge-commit - $ cd $TESTTMP/test-untopic-merge-commit - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = enforce - > EOF - $ touch ROOT - $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore - 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=ignore - - $ 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 - (see 'hg help -e topic.topic-mode' for details) - - $ 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 - - -Testing the config knob to about on untopiced merge commit -================================================================ - - $ hg init $TESTTMP/test-untopic-merge-commit-abort - $ cd $TESTTMP/test-untopic-merge-commit-abort - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = enforce-all - > EOF - $ touch ROOT - $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore - 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=ignore - - $ 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" - abort: no active topic - (see 'hg help -e topic.topic-mode' for details) - [255] - - $ hg log -G - @ changeset: 2:a4da109ee59f - | tag: tip - | parent: 0:ec1d2790416d - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: default - | - | @ 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 - -Testing the config knob to use a random topic for untopic commit -==================================================================== - - $ hg init $TESTTMP/test-untopic-random - $ cd $TESTTMP/test-untopic-random - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = random - > EOF - - $ touch ROOT - $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore - adding ROOT - - $ touch A - $ hg add A - $ hg commit -m "Add A" --config devel.randomseed=42 - active topic 'panoramic-antelope' grew its first changeset - - $ hg up -r "desc(ROOT)" - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - - $ touch B - $ hg add B - $ hg commit -m "Add B" --config devel.randomseed=128 - active topic 'various-dove' grew its first changeset - -Test a merge too - - $ hg phase --public -r . - active topic 'various-dove' is now empty - $ hg up default - clearing empty topic "various-dove" - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg log -G - @ changeset: 2:2d2acb6efad5 - | tag: tip - | parent: 0:ec1d2790416d - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: Add B - | - | o changeset: 1:d4b548f35972 - |/ topic: panoramic-antelope - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: Add A - | - o changeset: 0:ec1d2790416d - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: ROOT - - $ hg merge panoramic-antelope - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (branch merge, don't forget to commit) - $ hg ci -m 'merge' -Testing the config knob to use a random topic for untopic commit (even for merge) -================================================================================= - - $ hg init $TESTTMP/test-untopic-random-all - $ cd $TESTTMP/test-untopic-random-all - $ cat <> .hg/hgrc - > [phases] - > publish=false - > EOF - $ cat <> $HGRCPATH - > [experimental] - > topic-mode = random-all - > EOF - - $ touch ROOT - $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore - adding ROOT - - $ touch A - $ hg add A - $ hg commit -m "Add A" --config devel.randomseed=42 - active topic 'panoramic-antelope' grew its first changeset - - $ hg up -r "desc(ROOT)" - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - - $ touch B - $ hg add B - $ hg commit -m "Add B" --config devel.randomseed=128 - active topic 'various-dove' grew its first changeset - -Test a merge too - - $ hg phase --public -r . - active topic 'various-dove' is now empty - $ hg up default - clearing empty topic "various-dove" - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg log -G - @ changeset: 2:2d2acb6efad5 - | tag: tip - | parent: 0:ec1d2790416d - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: Add B - | - | o changeset: 1:d4b548f35972 - |/ topic: panoramic-antelope - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: Add A - | - o changeset: 0:ec1d2790416d - user: test - date: Thu Jan 01 00:00:00 1970 +0000 - summary: ROOT - - $ hg merge panoramic-antelope - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (branch merge, don't forget to commit) - $ hg ci -m 'merge' --config devel.randomseed=1337 - active topic 'omniscient-locust' grew its first changeset