changeset 6565:835f0adf8e39

topic: test config files and explicit --rev arguments using `hg incoming`
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 30 Sep 2023 15:41:05 -0300
parents 2d3771d61068
children cb009f13126a
files tests/test-namespaces-exchange.t
diffstat 1 files changed, 68 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-namespaces-exchange.t	Mon Oct 09 15:07:38 2023 -0300
+++ b/tests/test-namespaces-exchange.t	Sat Sep 30 15:41:05 2023 -0300
@@ -167,13 +167,80 @@
   new changesets d5d5dda52b2f (1 drafts)
   (run 'hg update' to get a working copy)
 
+testing related config options
+also specifying changesets and branches explicitly
+
+  $ echo elderberry > e
+  $ hg debug-topic-namespace eve
+  $ hg topic elderberry
+  $ hg ci -qAm 'elderberry'
+
+  $ echo feijoa > f
+  $ hg debug-topic-namespace frank
+  $ hg topic feijoa
+  $ hg ci -qAm 'feijoa'
+
+global hgrc
+
+  $ cat >> $HGRCPATH << EOF
+  > [experimental]
+  > tns-default-pull-namespaces = alice, bob, eve
+  > EOF
+
+  $ hg incoming -R ../clone
+  comparing with * (glob)
+  searching for changes
+  4: elderberry default//eve/elderberry (draft)
+
+global hgrc with explicit target
+
+  $ hg incoming -R ../clone --rev tip
+  comparing with * (glob)
+  searching for changes
+  4: elderberry default//eve/elderberry (draft)
+  5: feijoa default//frank/feijoa (draft)
+
+source repo hgrc (should not matter)
+
+  $ cat >> ../orig/.hg/hgrc << EOF
+  > [experimental]
+  > tns-default-pull-namespaces = does, not, matter
+  > EOF
+
+  $ hg incoming -R ../clone
+  comparing with * (glob)
+  searching for changes
+  4: elderberry default//eve/elderberry (draft)
+
+local repo hgrc (overrides global hgrc)
+
+  $ cat >> ../clone/.hg/hgrc << EOF
+  > [experimental]
+  > tns-default-pull-namespaces = frank
+  > EOF
+
+  $ hg incoming -R ../clone
+  comparing with * (glob)
+  searching for changes
+  4: elderberry default//eve/elderberry (draft)
+  5: feijoa default//frank/feijoa (draft)
+
+local repo hgrc with explicit target
+
+  $ hg incoming -R ../clone --rev 4
+  comparing with * (glob)
+  searching for changes
+  4: elderberry default//eve/elderberry (draft)
+
 #if http
   $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
   $ cat $TESTTMP/errors.log
 #endif
 
   $ hg branches
-  default//dave/durian           3:d5d5dda52b2f
+  default//frank/feijoa          5:c58726fdcfd8
+  default//eve/elderberry        4:59694f5082fe (inactive)
+  default//dave/durian           3:d5d5dda52b2f (inactive)
   default//charlie/coconut       2:16d2440597e2 (inactive)
   default//bob/banana            1:ed9751f04a18 (inactive)
   default//apple                 0:bf4c1d971543 (inactive)