Mercurial > evolve
changeset 6878:2fbe91d762ef
topic: use FQBN for displaying topic name when it becomes empty
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 26 Oct 2023 15:30:19 -0300 |
parents | f8ea46c21b56 |
children | 9da0114a8a02 |
files | hgext3rd/topic/__init__.py tests/test-evolve-public-content-divergent-discard.t tests/test-namespaces-report.t tests/test-topic-change.t tests/test-topic-flow-publish-flag.t tests/test-topic-flow-reject-untopiced.t tests/test-topic-fold.t tests/test-topic-mode.t tests/test-topic-stack.t tests/test-topic-tutorial.t tests/test-topic.t |
diffstat | 11 files changed, 18 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Thu Sep 26 17:09:11 2024 +0400 +++ b/hgext3rd/topic/__init__.py Thu Oct 26 15:30:19 2023 -0300 @@ -886,6 +886,7 @@ ct = self.currenttopic if not ct: return tr + cfqbn = repo.dirstate.fqbn(length=common.FQBN_SHORT) ctwasempty = stack.stack(self, topic=ct).changesetcount == 0 reporef = weakref.ref(self) @@ -897,7 +898,7 @@ empty = csetcount == 0 if empty and not ctwasempty: ui.status(b"active topic '%s' is now empty\n" - % ui.label(ct, b'topic.active')) + % ui.label(cfqbn, b'topic.active')) trnames = getattr(tr, 'names', getattr(tr, '_names', ())) if (b'phase' in trnames or any(n.startswith(b'push-response')
--- a/tests/test-evolve-public-content-divergent-discard.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-evolve-public-content-divergent-discard.t Thu Oct 26 15:30:19 2023 -0300 @@ -669,7 +669,7 @@ (publish one side) $ hg phase --public - active topic 'topic-1' is now empty + active topic 'double//slash//tns-1/topic-1' is now empty (use 'hg topic --clear' to clear it if needed) $ hg up -r "draft()" clearing empty topic "topic-1" @@ -711,6 +711,6 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset 638eff2d31b7 is a closed branch head and differs from local bde8ac1c636a by "branch, description" only, discarding 638eff2d31b7 content divergence resolution between bde8ac1c636a (public) and 638eff2d31b7 has same content as bde8ac1c636a, discarding 638eff2d31b7 - active topic 'topic-2' is now empty + active topic '//tns-2/topic-2' is now empty working directory is now at bde8ac1c636a
--- a/tests/test-namespaces-report.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-namespaces-report.t Thu Oct 26 15:30:19 2023 -0300 @@ -136,7 +136,7 @@ searching for changes no changes found topic namespaces affected: carol - active topic 'c' is now empty + active topic '//carol/c' is now empty (use 'hg topic --clear' to clear it if needed) [1] @@ -211,8 +211,8 @@ searching for changes no changes found topic namespaces affected: dave - active topic 'd' is now empty - active topic 'd' is now empty + active topic '//dana/d' is now empty + active topic '//dave/d' is now empty (use 'hg topic --clear' to clear it if needed) [1] @@ -230,7 +230,7 @@ searching for changes no changes found topic namespaces affected: dave - active topic 'd' is now empty + active topic '//dave/d' is now empty (use 'hg topic --clear' to clear it if needed) [1]
--- a/tests/test-topic-change.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-change.t Thu Oct 26 15:30:19 2023 -0300 @@ -299,7 +299,7 @@ $ hg topic -r . --clear clearing empty topic "watwat" - active topic 'watwat' is now empty + active topic '//watwat' is now empty cleared topic on 1 changesets $ hg log -r . -T '{rev}: {join(extras, " ")}\n'
--- a/tests/test-topic-flow-publish-flag.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-flow-publish-flag.t Thu Oct 26 15:30:19 2023 -0300 @@ -304,7 +304,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - active topic 'topic_A' is now empty + active topic '//topic_A' is now empty (use 'hg topic --clear' to clear it if needed) $ hg tgl 'all()' @ 11:d06fc4f891e8 c_dK0 public default
--- a/tests/test-topic-flow-reject-untopiced.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-flow-reject-untopiced.t Thu Oct 26 15:30:19 2023 -0300 @@ -167,4 +167,4 @@ adding manifests adding file changes added 4 changesets with 4 changes to 4 files - active topic 'server' is now empty + active topic '//server' is now empty
--- a/tests/test-topic-fold.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-fold.t Thu Oct 26 15:30:19 2023 -0300 @@ -79,7 +79,7 @@ o 0:ea207398892eb49e06441f10dda2a731f0450f20 topics: $ hg fold --exact -r "(tip~1)::" -m "folded 2" - active topic 'myotherfeature' is now empty + active topic '//myotherfeature' is now empty 2 changesets folded clearing empty topic "myotherfeature" 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-topic-mode.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-mode.t Thu Oct 26 15:30:19 2023 -0300 @@ -228,7 +228,7 @@ Test a merge too $ hg phase --public -r . - active topic 'various-dove' is now empty + active topic '//various-dove' is now empty (use 'hg topic --clear' to clear it if needed) $ hg up default clearing empty topic "various-dove" @@ -289,7 +289,7 @@ Test a merge too $ hg phase --public -r . - active topic 'various-dove' is now empty + active topic '//various-dove' is now empty (use 'hg topic --clear' to clear it if needed) $ hg up default clearing empty topic "various-dove"
--- a/tests/test-topic-stack.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-stack.t Thu Oct 26 15:30:19 2023 -0300 @@ -63,7 +63,7 @@ s2@ c_b (current) s1: c_a $ hg phase --public 'topic("other")' - active topic 'other' is now empty + active topic '//other' is now empty (use 'hg topic --clear' to clear it if needed) After changing the phase of all the changesets in "other" to public, the topic should still be active, but is empty. We should be better at informing the user about it and displaying good data in this case.
--- a/tests/test-topic-tutorial.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic-tutorial.t Thu Oct 26 15:30:19 2023 -0300 @@ -602,7 +602,7 @@ adding file changes added 2 changesets with 2 changes to 1 files 2 new obsolescence markers - active topic 'food' is now empty + active topic '//food' is now empty (use 'hg topic --clear' to clear it if needed) $ hg topics
--- a/tests/test-topic.t Thu Sep 26 17:09:11 2024 +0400 +++ b/tests/test-topic.t Thu Oct 26 15:30:19 2023 -0300 @@ -617,7 +617,7 @@ query tip $ hg phase --public narf - active topic 'narf' is now empty + active topic '//narf' is now empty (use 'hg topic --clear' to clear it if needed) POSSIBLE BUG: narf topic stays alive even though we just made all @@ -681,7 +681,7 @@ added 3 changesets with 3 changes to 1 files new changesets 7c34953036d6:ae074045b7a7 1 local changesets published - active topic 'query' is now empty + active topic '//query' is now empty (run 'hg update' to get a working copy) $ hg topics * query (0 changesets)