Patchwork test-strip-narrow: adjust bundle removal for Windows test stability

login
register
mail settings
Submitter Matt Harbison
Date March 22, 2018, 3:03 a.m.
Message ID <0a77cd27445c55270e47.1521687833@Envy>
Download mbox | patch
Permalink /patch/29766/
State Accepted
Headers show

Comments

Matt Harbison - March 22, 2018, 3:03 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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.
Yuya Nishihara - March 22, 2018, 2:12 p.m.
On Wed, 21 Mar 2018 23:03:53 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@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

Queued, thanks.

Patch

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)