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

Re: svn diff --svnpatch & svn patch

From: Charles Acknin <charlesacknin_at_gmail.com>
Date: 2007-09-09 15:03:35 CEST

On 9/9/07, David Glasser <glasser@davidglasser.net> wrote:
> On 9/8/07, Jay Levitt <lists-svndev@shopwatch.org> wrote:
> > Can't svn patch call patch externally with the unidiff portion if patch
> > is present? That makes things better for people who DO have GNU patch,
> > without making things worse for anyone who doesn't.
>
> Good call. You should be able to configure a path to GNU patch (or a
> similar tool with a similar interface) in the user config directory,
> and 'svn patch' should call it (with the right -p argument!); if 'svn
> patch' can't find it it can print a message saying "text diffs not
> applied, please use an external tool".

OK, here's the behaviour I'm planning to implement:
  - look up the --patch-cmd arg on the command line and use it
  - fallback if not found: look up patch-cmd setting in the user
config, and use it
  - fallback if not found: search $PATH for the 'patch' binary
(svn_io_run_cmd/execvp) and call it

Would that be fine?

Cheers,
Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 9 15:00:15 2007

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.