You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Stenberg <da...@haxx.se> on 2001/08/27 22:26:38 UTC

gnu-diff.sh patch

'ello

Any objections on me applying this fix for gnu-diff.sh? It corrects:

 1. Test command's stderr no longer pollutes the configure output

 2. The GNU diff selection now picks the *FIRST* GNU diff command that
    matches the criteria, instead of the last as it currently does!

 3. It also makes it stop searching through the path as soon as it found one
    diff that works.


diff -u -r1.1 gnu-diff.sh
--- gnu-diff.sh 2001/06/28 21:44:14     1.1
+++ gnu-diff.sh 2001/08/27 22:22:02
@@ -47,7 +47,7 @@
             echo -n "...extra text, still no newline" >> foofile

             # do a diff, create a patch.
-            ${searchdir}/diff -u foofile foofile2 > foo.patch
+            ${searchdir}/diff -u foofile foofile2 > foo.patch 2>/dev/null

             # apply the patch to foofile2
             ${gnu_patch_path} < foo.patch 2>&1 >/dev/null
@@ -56,6 +56,7 @@
             cmp -s foofile foofile2 2>&1 >/dev/null
             if test $? -eq 0; then
                 gnu_diff_path=${searchdir}/diff
+                final=""
             fi

             # cleanup


-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gnu-diff.sh patch

Posted by kf...@collab.net.
Daniel Stenberg <da...@haxx.se> writes:
> Any objections on me applying this fix for gnu-diff.sh? It corrects:
> 
>  1. Test command's stderr no longer pollutes the configure output
> 
>  2. The GNU diff selection now picks the *FIRST* GNU diff command that
>     matches the criteria, instead of the last as it currently does!
> 
>  3. It also makes it stop searching through the path as soon as it found one
>     diff that works.

Looks like a good plan to me; I see you've already applied it.  Kewl.

-K

> diff -u -r1.1 gnu-diff.sh
> --- gnu-diff.sh 2001/06/28 21:44:14     1.1
> +++ gnu-diff.sh 2001/08/27 22:22:02
> @@ -47,7 +47,7 @@
>              echo -n "...extra text, still no newline" >> foofile
> 
>              # do a diff, create a patch.
> -            ${searchdir}/diff -u foofile foofile2 > foo.patch
> +            ${searchdir}/diff -u foofile foofile2 > foo.patch 2>/dev/null
> 
>              # apply the patch to foofile2
>              ${gnu_patch_path} < foo.patch 2>&1 >/dev/null
> @@ -56,6 +56,7 @@
>              cmp -s foofile foofile2 2>&1 >/dev/null
>              if test $? -eq 0; then
>                  gnu_diff_path=${searchdir}/diff
> +                final=""
>              fi
> 
>              # cleanup
> 
> 
> -- 
>       Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
>    ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org