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

Re: svn commit: r1485007 - /subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/io.c

From: Philip Martin <philip_at_codematters.co.uk>
Date: Wed, 22 May 2013 10:44:33 +0100

Philip Martin <philip.martin_at_wandisco.com> writes:

> My first loop results in a final trailing " " and my second loop results
> in a leading " ". Perhaps:
>
> const char *failed_command = cmd[0];
> for (i = 1; cmd[i]; ++i)
> failed_command = apr_psprintf(pool, "%s %s", failed_command, cmd[i]);

Another problem is that you go on to do:

  return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
                           _("'%s' was expanded to '%s' and returned %d"),
                           external_diff_cmd,
                           svn_dirent_local_style(failed_command, pool),
                           *pexitcode);

which applies local style to the whole command string not just to paths.
On Windows that will convert all '/' to '\' and command options on
Windows can use '/' where Unix would use '-'.

-- 
Philip
Received on 2013-05-22 11:45:30 CEST

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