[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

the patch/diff saga continues.

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-06-28 18:26:26 CEST

New Problem:

`local_tests.py 7` ("basic update") still fails on FreeBSD, even now
that we're requiring and using GNU patch.

In a nutshell: if I 'svn up' and receive a change that converts a
one-line file into a new one-line file, a .rej file is produced (and
thus Subversion reports a bogus conflict.)


The patchfile being produced by `diff', when operating on two
single-line files, is inferior.

Instead of something like this:

   --- foofile Thu Jun 28 09:54:18 2001
   +++ foofile2 Thu Jun 28 09:54:18 2001
   @@ -1 +1 @@
   -some text, no newline...extra text, still no newline
   \ No newline at end of file
   +some text, no newline
   \ No newline at end of file

...it's producing unified diffs like this:

   --- foofile Thu Jun 28 11:08:43 2001
   +++ foofile2 Thu Jun 28 11:08:43 2001
   @@ -1 +1 @@
   -some text, no newline...extra text, still no newline
   +some text, no newline

The first example, which was produced on a Linux system, applies
cleanly with no problems. The second example, produced on FreeBSD,
creates a "failed hunk" error and a .rej file.

The Mystery:

Both Linux and FreeBSD claim to be using the *exact* same version of
GNU diff:

      $ diff -v
      diff - GNU diffutils version 2.7


Investigating FreeBSD further, I notice that the diff source in
sitting in /usr/src/... and thus part of the "base system", built
as part of `make world`. The binary lives in /usr/bin.

I download, unpack, and compile the latest diffutils-2.7.tar.gz
sourceball. This fresh `diff' binary produces correct patches, just
like the Linux system.

So what the heck is wrong with the `diff' included in the FreeBSD

If we solve this problem via autoconf requirements again (like the
patch problem), it's going to get really ugly. It's one thing to
force FreeBSD users to do a `make install` in /usr/ports/devel/patch,
but it's much more severe to make them manually fetch and build the
whole diffutils package, and ask them to carefully copy `diff' to
/usr/local/bin. Are there no other options?

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:32 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.