[PATCH] test-strip-narrow: adjust bundle removal for Windows test stability

Matt Harbison mharbison72 at gmail.com
Thu Mar 22 03:03:53 UTC 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1521686186 14400
#      Wed Mar 21 22:36:26 2018 -0400
# Node ID 0a77cd27445c55270e4798351c5a2575e810d268
# Parent  6bc2f1b3bc9d3fb73ffe605f9d811bd75727434e
test-strip-narrow: adjust bundle removal for Windows test stability

MSYS was mangling $TESTTMP to C:\\Users\\...\\test-narrow-strip.t-flat/, which
caused `rm` to fail.  The -f was suppressing -ENOENT, so the only clue something
was wrong was when 2 bundles were applied via `hg unbundle` on line 91, instead
of just 1.  This changed the text output of `hg unbundle`.

The first `rm` wasn't causing an issue, but is changed for consistency with the
rest of the file.

diff --git a/tests/test-narrow-strip.t b/tests/test-narrow-strip.t
--- a/tests/test-narrow-strip.t
+++ b/tests/test-narrow-strip.t
@@ -55,7 +55,7 @@ Can strip and recover changesets affecti
 
   $ hg co -r 'desc("modify inside")'
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
+  $ rm -f .hg/strip-backup/*-backup.hg
   $ hg strip .
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
@@ -84,7 +84,7 @@ Can strip and recover changesets affecti
   inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
   outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
 
-  $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
+  $ rm -f .hg/strip-backup/*-backup.hg
   $ hg strip .
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)


More information about the Mercurial-devel mailing list