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

"svn diff --diff-cmd diff" doesn't work

From: Blair Zajac <blair_at_orcaware.com>
Date: 2003-03-20 00:13:04 CET

Using svn rev 5383, trying to do this works with a full path to diff

    svn diff --diff-cmd /usr/bin/diff

but using just the program name doesn't:

    svn diff --diff-cmd diff
svn diff --diff-cmd diff
Index: data_gatherers/procallator/procallator.cfg
===================================================================
svn: Error calling external program
svn: 'diff' returned 255

This looks like something that should work, after all, that's what
PATH is for :)

Doing an strace shows this:

29640 execve("diff", ["diff", "-u", "-L", "procallator.cfg\t(revision 216)", "-L
", "procallator.cfg\t(working copy)", ".svn/text-base/procallator.cfg.s"..., "pr
ocallator.cfg"], [/* 0 vars */]) = -1 ENOENT (No such file or directory)

The manual page for exec* shows says that all exec* are a frontend for
execve, so seeing execve doesn't mean we're calling it.

Here's a partial stack trace:

#0 0x40528716 in fork () from /lib/tls/libpthread.so.0
#1 0x402bfc8c in apr_proc_create (new=0xbfffd410, progname=0x8098730 "diff",
    args=0x8098740, env=0x0, attr=0x8098448, pool=0x80983e8) at proc.c:352
#2 0x40248b6a in svn_io_run_cmd (path=0xbfffd410 "\004ã#@",
    cmd=0x807e480 "diff", args=0x8098420, exitcode=0xbfffd4e0, exitwhy=0x0,
    inherit=0, infile=0x0, outfile=0x80600f8, errfile=0x8060140,
    pool=0x80983e8) at subversion/libsvn_subr/io.c:1075
#3 0x40248ed9 in svn_io_run_diff (dir=0x0, user_args=0x0, num_user_args=0,
    label1=0x807e280 "procallator.cfg\t(revision 216)",
    label2=0x807e2a0 "procallator.cfg\t(working copy)", from=0x0, to=0x0,
    pexitcode=0xbfffd4e0, outfile=0x0, errfile=0x0,
    diff_cmd=0x8098420 "\200ä\a\b2p%@\036p%@\200â\a\b\036p%@ â\a\bH#\a\bè\"\a\b", pool=0x80983e8) at subversion/libsvn_subr/io.c:1185

It looks like env is NULL, so PATH may not be getting sent down, but this
is without looking closely at this.

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 20 00:12:59 2003

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.