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

Re: svn system() replacement ?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-01-28 15:11:52 CET

Daniel Stenberg <daniel@haxx.se> writes:

> So, I hacked up a function that looks like this:
>
> /* suggested new function */
> svn_error_t *
> svn_io_shell_cmd (const char *path,
> const char *cmdline,
> const char *const *env,
> int *exitcode,
> apr_exit_why_e *exitwhy,
> apr_pool_t *pool);
>
> This works as a system() replacement.
>
> The third argument above needs attention. The environment must be passed to
> the commit function after being received in the main function's third
> argument. This probably requires that all client functions called from the
> main subcommand->cmd_func "thing" must support an additional "const char *
> const *penv" argument.
>
> Currently (in my working code) I build a faked "environment" by setting
> "TERM=vt100" as emacs refuse to run properly unless it get a TERM variable
> that it recognizes! And this faked thing looks reeeeeally ugly!

[Unix again, don't know about Win32/MacOS/...]

Creating a "faked" environment doesn't sound right. The svn process
will inherit its environment from whatever invoked it, and the editor
in turn will inherit from svn. Are you saying this doesn't work? Do
you have TERM set and exported in the environment you are using to
invoke svn?

-- 
Philip
---------------------------------------------------------------------
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:37:00 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.