changeset 5992:eb1333a0c290

tests: use `| tee` for writing to files at the same time as to stdout
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 01 Jul 2021 14:36:20 +0300
parents 79a63cc9757e
children 3a3341e44a0e
files tests/test-stablerange-branchpoint.t tests/test-stablerange.t
diffstat 2 files changed, 30 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-stablerange-branchpoint.t	Tue Jun 29 12:46:28 2021 +0300
+++ b/tests/test-stablerange-branchpoint.t	Thu Jul 01 14:36:20 2021 +0300
@@ -40,15 +40,14 @@
   bebd167eb94d 5
   c8d03c1b5e94 6
   f69452c5b1af 7
-  $ hg debugstablerange --verify --verbose --subranges --rev 1
+  $ hg debugstablerange --verify --verbose --subranges --rev 1 | tee 1.range
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 1 > 1.range
 
 bigger subset reuse most of the previous one
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 4
+  $ hg debugstablerange --verify --verbose --subranges --rev 4 | tee 4.range
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -58,7 +57,6 @@
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 4 > 4.range
   $ diff -u 1.range 4.range
   --- 1.range	* (glob)
   +++ 4.range	* (glob)
@@ -77,7 +75,7 @@
 Using a range not ending on 2**N boundary
 we fall back on 2**N as much as possible
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 5
+  $ hg debugstablerange --verify --verbose --subranges --rev 5 | tee 5.range
   c8d03c1b5e94-0 (5, 6, 6) [complete] - 2dc09a01254d-0 (3, 4, 4), c8d03c1b5e94-4 (5, 6, 2)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -89,7 +87,6 @@
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   c8d03c1b5e94-5 (5, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 5 > 5.range
   $ diff -u 4.range 5.range
   --- 4.range	* (glob)
   +++ 5.range	* (glob)
@@ -110,7 +107,7 @@
 
 Even two unperfect range overlap a lot
 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip
+  $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range
   f69452c5b1af-0 (6, 7, 7) [complete] - 2dc09a01254d-0 (3, 4, 4), f69452c5b1af-4 (6, 7, 3)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   f69452c5b1af-4 (6, 7, 3) [complete] - c8d03c1b5e94-4 (5, 6, 2), f69452c5b1af-6 (6, 7, 1)
@@ -124,7 +121,6 @@
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   c8d03c1b5e94-5 (5, 6, 1) [leaf] - 
   f69452c5b1af-6 (6, 7, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip > tip.range
   $ diff -u 5.range tip.range
   --- 5.range	* (glob)
   +++ tip.range	* (glob)
@@ -196,12 +192,11 @@
 
 (left branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2'
+  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev left
+  $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
@@ -209,7 +204,6 @@
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -225,12 +219,11 @@
 
 (right branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev right~2
+  $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range
   e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev right
+  $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range
   a2f58e9c1e56-0 (6, 4, 4) [complete] - e7bd5218ca15-0 (4, 2, 2), a2f58e9c1e56-2 (6, 4, 2)
   a2f58e9c1e56-2 (6, 4, 2) [complete] - 3a367db1fabc-2 (5, 3, 1), a2f58e9c1e56-3 (6, 4, 1)
   e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1)
@@ -238,7 +231,6 @@
   3a367db1fabc-2 (5, 3, 1) [leaf] - 
   a2f58e9c1e56-3 (6, 4, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -254,7 +246,7 @@
 
 The merge reuse as much of the slicing created for one of the branch
 
-  $ hg debugstablerange --verify --verbose --subranges --rev merge
+  $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range
   5f18015f9110-0 (7, 8, 8) [complete] - 2dc09a01254d-0 (3, 4, 4), 5f18015f9110-4 (7, 8, 4)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   5f18015f9110-4 (7, 8, 4) [complete] - 3a367db1fabc-1 (5, 3, 2), 5f18015f9110-6 (7, 8, 2)
@@ -270,7 +262,6 @@
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   a2f58e9c1e56-3 (6, 4, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -381,14 +372,13 @@
 
 (left branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2'
+  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range
   01241442b3c2-0 (2, 3, 3) [complete] - 66f7d451a68b-0 (1, 2, 2), 01241442b3c2-2 (2, 3, 1)
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   01241442b3c2-2 (2, 3, 1) [leaf] - 
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev left
+  $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -398,7 +388,6 @@
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -417,7 +406,7 @@
 
 (right branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev right~2
+  $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range
   42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2)
   42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1)
   de561312eff4-0 (5, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), de561312eff4-1 (5, 2, 1)
@@ -425,8 +414,7 @@
   42b07e8da27d-3 (7, 4, 1) [leaf] - 
   b9bc20507e0b-2 (6, 3, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev right
+  $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range
   f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2)
   42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2)
   42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1)
@@ -438,7 +426,6 @@
   b9bc20507e0b-2 (6, 3, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -462,7 +449,7 @@
 
 We are still able to reuse one of the branch however
 
-  $ hg debugstablerange --verify --verbose --subranges --rev merge
+  $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range
   8aca7f8c9bd2-0 (10, 11, 11) [complete] - bebd167eb94d-0 (4, 5, 5), 42b07e8da27d-1 (7, 4, 3), 8aca7f8c9bd2-8 (10, 11, 3)
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
@@ -483,7 +470,6 @@
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -540,7 +526,7 @@
 
 Range above the merge, reuse subrange from the merge
 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip
+  $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range
   e6b8d5b46647-0 (12, 13, 13) [complete] - bebd167eb94d-0 (4, 5, 5), 42b07e8da27d-1 (7, 4, 3), e6b8d5b46647-8 (12, 13, 5)
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   e6b8d5b46647-8 (12, 13, 5) [complete] - 485383494a89-8 (11, 12, 4), e6b8d5b46647-12 (12, 13, 1)
@@ -565,7 +551,6 @@
   de561312eff4-1 (5, 2, 1) [leaf] - 
   e6b8d5b46647-12 (12, 13, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'tip' > tip.range
   $ diff -u merge.range tip.range
   --- merge.range	* (glob)
   +++ tip.range	* (glob)
--- a/tests/test-stablerange.t	Tue Jun 29 12:46:28 2021 +0300
+++ b/tests/test-stablerange.t	Thu Jul 01 14:36:20 2021 +0300
@@ -47,15 +47,14 @@
   bebd167eb94d 5
   c8d03c1b5e94 6
   f69452c5b1af 7
-  $ hg debugstablerange --verify --verbose --subranges --rev 1
+  $ hg debugstablerange --verify --verbose --subranges --rev 1 | tee 1.range
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 1 > 1.range
 
 bigger subset reuse most of the previous one
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 4
+  $ hg debugstablerange --verify --verbose --subranges --rev 4 | tee 4.range
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -65,7 +64,6 @@
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 4 > 4.range
   $ diff -u 1.range 4.range
   --- 1.range	* (glob)
   +++ 4.range	* (glob)
@@ -84,7 +82,7 @@
 Using a range not ending on 2**N boundary
 we fall back on 2**N as much as possible
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 5
+  $ hg debugstablerange --verify --verbose --subranges --rev 5 | tee 5.range
   c8d03c1b5e94-0 (5, 6, 6) [complete] - 2dc09a01254d-0 (3, 4, 4), c8d03c1b5e94-4 (5, 6, 2)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -96,7 +94,6 @@
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   c8d03c1b5e94-5 (5, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 5 > 5.range
   $ diff -u 4.range 5.range
   --- 4.range	* (glob)
   +++ 5.range	* (glob)
@@ -117,7 +114,7 @@
 
 Even two unperfect range overlap a lot
 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip
+  $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range
   f69452c5b1af-0 (6, 7, 7) [complete] - 2dc09a01254d-0 (3, 4, 4), f69452c5b1af-4 (6, 7, 3)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   f69452c5b1af-4 (6, 7, 3) [complete] - c8d03c1b5e94-4 (5, 6, 2), f69452c5b1af-6 (6, 7, 1)
@@ -131,7 +128,6 @@
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   c8d03c1b5e94-5 (5, 6, 1) [leaf] - 
   f69452c5b1af-6 (6, 7, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip > tip.range
   $ diff -u 5.range tip.range
   --- 5.range	* (glob)
   +++ tip.range	* (glob)
@@ -203,12 +199,11 @@
 
 (left branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2'
+  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev left
+  $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
@@ -216,7 +211,6 @@
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -232,12 +226,11 @@
 
 (right branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev right~2
+  $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range
   e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1)
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev right
+  $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range
   a2f58e9c1e56-0 (6, 4, 4) [complete] - e7bd5218ca15-0 (4, 2, 2), a2f58e9c1e56-2 (6, 4, 2)
   a2f58e9c1e56-2 (6, 4, 2) [complete] - 3a367db1fabc-2 (5, 3, 1), a2f58e9c1e56-3 (6, 4, 1)
   e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1)
@@ -245,7 +238,6 @@
   3a367db1fabc-2 (5, 3, 1) [leaf] - 
   a2f58e9c1e56-3 (6, 4, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -261,7 +253,7 @@
 
 The merge reuse as much of the slicing created for one of the branch
 
-  $ hg debugstablerange --verify --verbose --subranges --rev merge
+  $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range
   5f18015f9110-0 (7, 8, 8) [complete] - 2dc09a01254d-0 (3, 4, 4), 5f18015f9110-4 (7, 8, 4)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   5f18015f9110-4 (7, 8, 4) [complete] - 3a367db1fabc-1 (5, 3, 2), 5f18015f9110-6 (7, 8, 2)
@@ -277,7 +269,6 @@
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   a2f58e9c1e56-3 (6, 4, 1) [leaf] - 
   e7bd5218ca15-1 (4, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -388,14 +379,13 @@
 
 (left branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2'
+  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range
   01241442b3c2-0 (2, 3, 3) [complete] - 66f7d451a68b-0 (1, 2, 2), 01241442b3c2-2 (2, 3, 1)
   66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1)
   01241442b3c2-2 (2, 3, 1) [leaf] - 
   1ea73414a91b-0 (0, 1, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev left
+  $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range
   bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1)
   2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2)
   2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1)
@@ -405,7 +395,6 @@
   2dc09a01254d-3 (3, 4, 1) [leaf] - 
   66f7d451a68b-1 (1, 2, 1) [leaf] - 
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -424,7 +413,7 @@
 
 (right branch)
 
-  $ hg debugstablerange --verify --verbose --subranges --rev right~2
+  $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range
   42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2)
   42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1)
   de561312eff4-0 (5, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), de561312eff4-1 (5, 2, 1)
@@ -432,8 +421,7 @@
   42b07e8da27d-3 (7, 4, 1) [leaf] - 
   b9bc20507e0b-2 (6, 3, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range
-  $ hg debugstablerange --verify --verbose --subranges --rev right
+  $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range
   f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2)
   42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2)
   42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1)
@@ -445,7 +433,6 @@
   b9bc20507e0b-2 (6, 3, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -469,7 +456,7 @@
 
 We are still able to reuse one of the branch however
 
-  $ hg debugstablerange --verify --verbose --subranges --rev merge
+  $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range
   8aca7f8c9bd2-0 (10, 11, 11) [complete] - f4b7da68b467-0 (9, 6, 6), 01241442b3c2-1 (2, 3, 2), 8aca7f8c9bd2-8 (10, 11, 3)
   f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2)
   42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2)
@@ -490,7 +477,6 @@
   bebd167eb94d-4 (4, 5, 1) [leaf] - 
   de561312eff4-1 (5, 2, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -548,7 +534,7 @@
 
 Range above the merge, reuse subrange from the merge
 
-  $ hg debugstablerange --verify --verbose --subranges --rev tip
+  $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range
   e6b8d5b46647-0 (12, 13, 13) [complete] - f4b7da68b467-0 (9, 6, 6), 01241442b3c2-1 (2, 3, 2), e6b8d5b46647-8 (12, 13, 5)
   f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2)
   e6b8d5b46647-8 (12, 13, 5) [complete] - 485383494a89-8 (11, 12, 4), e6b8d5b46647-12 (12, 13, 1)
@@ -573,7 +559,6 @@
   de561312eff4-1 (5, 2, 1) [leaf] - 
   e6b8d5b46647-12 (12, 13, 1) [leaf] - 
   f4b7da68b467-5 (9, 6, 1) [leaf] - 
-  $ hg debugstablerange --verify --verbose --subranges --rev 'tip' > tip.range
   $ diff -u merge.range tip.range
   --- merge.range	* (glob)
   +++ tip.range	* (glob)