external_diff should not assume diff is gnu diff

Bug #314254 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

  affects bzr
  tags diff bsd
  status confirmed
  importance medium

bzr diff when running an external diff assumes it understands the gnu
option --binary. bsd diff does not.

--
Martin

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 314254] [NEW] external_diff shouldn't use gnu-specific options

On Tue, 2009-01-06 at 02:52 +0000, Martin Pool wrote:
> Public bug reported:
>
> affects bzr
> tags diff bsd
> status confirmed
> importance medium
>
> bzr diff when running an external diff assumes it understands the gnu
> option --binary. bsd diff does not.

I'm not sure this is a bug; its reasonable to depend on certain
capabilities in external tools - bzr doesn't claim to need 'posix diff'.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 314254] [NEW] external_diff shouldn't use gnu-specific options

  summary external_diff should not assume diff is gnu diff

On 6 Jan 2009, Robert Collins <email address hidden> wrote:

> I'm not sure this is a bug; its reasonable to depend on certain
> capabilities in external tools - bzr doesn't claim to need 'posix diff'.

Having this feature just break is buggy. Various fixes are possible eg:

 * document that 'diff' must be GNU diff

 * run gdiff or gnudiff or whatever it's called

 * only use --binary on platforms where we reasonably expect that diff
   will support it

--
Martin

Revision history for this message
Martin Pool (mbp) wrote :

  summary "external_diff should not assume diff is gnu diff"

On 6 Jan 2009, Robert Collins <email address hidden> wrote:

> I'm not sure this is a bug; its reasonable to depend on certain
> capabilities in external tools - bzr doesn't claim to need 'posix diff'.

Having this feature just break is buggy. Various fixes are possible eg:

 * document that 'diff' must be GNU diff

 * run gdiff or gnudiff or whatever it's called

 * only use --binary on platforms where we reasonably expect that diff
   will support it

--
Martin

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 314254] [NEW] external_diff shouldn't use gnu-specific options

On Tue, 2009-01-06 at 09:13 +0000, Martin Pool wrote:
> Having this feature just break is buggy. Various fixes are possible eg:
>
> * document that 'diff' must be GNU diff
>
> * run gdiff or gnudiff or whatever it's called
>
> * only use --binary on platforms where we reasonably expect that diff
> will support it

I'd be inclined to just document that we need a diff supporting
--binary.

-Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
John A Meinel (jameinel) wrote :

That said, we only really need it on systems that do weird things with line endings, like Mac and Win32. I don't think --binary does anything for Linux or BSD.

So we could only supply the flag if "sys.platform in ('win32', 'cygwin')" and possibly 'darwin'. Though I'm pretty sure on darwin line-endings are not munged either.

Jelmer Vernooij (jelmer)
tags: added: diff
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.