Patchwork [2,of,3] test-lfs: perform the `chmod +x` command in a manner compatible with Windows

login
register
mail settings
Submitter Matt Harbison
Date Nov. 21, 2017, 6:31 a.m.
Message ID <8e1c165cf1eef41c1db8.1511245873@Envy>
Download mbox | patch
Permalink /patch/25700/
State Accepted
Headers show

Comments

Matt Harbison - Nov. 21, 2017, 6:31 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1510718032 18000
#      Tue Nov 14 22:53:52 2017 -0500
# Node ID 8e1c165cf1eef41c1db8359ed07424629c932c42
# Parent  b105c5b0f7808ba552f8a0425c74f5540e82c3f5
test-lfs: perform the `chmod +x` command in a manner compatible with Windows

Patch

diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -459,15 +459,26 @@ 
   > [lfs]
   > threshold=1
   > EOF
+  $ cat > ../patch.diff <<EOF
+  > # HG changeset patch
+  > 2
+  > 
+  > diff --git a/a b/a
+  > old mode 100644
+  > new mode 100755
+  > EOF
+
   $ for i in 1 2 3; do
   >     cp ../repo10/a a
   >     if [ $i = 3 ]; then
   >         # make a content-only change
-  >         chmod +x a
-  >         i=2
+  >         hg import -q --bypass ../patch.diff
+  >         hg update -q
+  >         rm ../patch.diff
+  >     else
+  >         echo $i >> a
+  >         hg commit -m $i -A a
   >     fi
-  >     echo $i >> a
-  >     hg commit -m $i -A a
   > done
   $ [ -d .hg/store/lfs/objects ]