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

login
register
mail settings
Submitter via Mercurial-devel
Date June 4, 2017, 8:54 p.m.
Message ID <414f0e052a6f91f37cb4.1496609662@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21178/
State Accepted
Headers show

Comments

via Mercurial-devel - June 4, 2017, 8:54 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1496469903 25200
#      Fri Jun 02 23:05:03 2017 -0700
# Node ID 414f0e052a6f91f37cb41feff5ea175deb6861fe
# Parent  e317abebf6b8004fbba99ff51801d7f228797a37
tests: simplify and clarify test-obsolete-bundle-strip.t a little
Augie Fackler - June 5, 2017, 2:10 p.m.
On Sun, Jun 04, 2017 at 01:54:22PM -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1496469903 25200
> #      Fri Jun 02 23:05:03 2017 -0700
> # Node ID 414f0e052a6f91f37cb41feff5ea175deb6861fe
> # Parent  e317abebf6b8004fbba99ff51801d7f228797a37
> tests: simplify and clarify test-obsolete-bundle-strip.t a little

queued, thanks

Patch

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 --rev "((${revs})::) - (${revs})"`
+  >     if [ -z "$children" ];
   >     then
   >         printf "# stripping: "
   >         prestripfile="${prefix}-pre-strip.txt"