[PATCH 2 of 2] tests: simplify and clarify test-obsolete-bundle-strip.t a little

Martin von Zweigbergk martinvonz at google.com
Sat Jun 3 03:35:19 EDT 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1496469903 25200
#      Fri Jun 02 23:05:03 2017 -0700
# Node ID ff06148cbf34428d71bd7ea9d2e31fa806686417
# Parent  f782e04fb7d18868cf7da00a41aaa8f15c8e8802
tests: simplify and clarify test-obsolete-bundle-strip.t a little

diff --git a/tests/test-obsolete-bundle-strip.t b/tests/test-obsolete-bundle-strip.t
--- a/tests/test-obsolete-bundle-strip.t
+++ b/tests/test-obsolete-bundle-strip.t
@@ -76,8 +76,8 @@
   >     echo '### Exclusive markers ###'
   >     cat "${exclufile}"
   >     # if the matched revs do not have children, we also check the result of strip
-  >     orphan=`hg log --hidden -T '.\n' --rev "(not (${revs})) and (${revs}::)" | wc -l | sed -e 's/ //g'`
-  >     if [ $orphan -eq 0 ];
+  >     children=`hg log --hidden -T . --rev "(${revs}::) - (${revs})" | wc -c`
+  >     if [ $children -eq 0 ];
   >     then
   >         printf "# stripping: "
   >         prestripfile="${prefix}-pre-strip.txt"


More information about the Mercurial-devel mailing list