Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
svn_error_t *
svn_io_start_cmd(apr_proc_t *cmd_proc,
const char *path,
const char *cmd,
const char *const *args,
svn_boolean_t inherit,
apr_file_t *infile,
apr_file_t *outfile,
apr_file_t *errfile,
apr_pool_t *pool);
/**
* Wait for the process @a *cmd_proc to complete and optionally retrieve
* its exit code. @a cmd is used only in error messages.
*
* If @a exitcode is not NULL, set @a *exitcode to the exit code of the
* process and do not consider any exit code to be an error. If @a exitcode
* is NULL, then if the exit code of the process is non-zero then return an
* #SVN_ERR_EXTERNAL_PROGRAM error.
*
* If @a exitwhy is not NULL, set @a *exitwhy to indicate why the process
* terminated and do not consider any reason to be an error. If @a exitwhy
* is NULL, then if the termination reason is not @c APR_PROC_CHECK_EXIT()
* then return an #SVN_ERR_EXTERNAL_PROGRAM error.
*
* @since New in 1.3.
*/
svn_error_t *
svn_io_wait_for_cmd(apr_proc_t *cmd_proc,
const char *cmd,
int *exitcode,
apr_exit_why_e *exitwhy,
apr_pool_t *pool);
/** Run a command to completion, by first calling svn_io_start_cmd() and
* then calling svn_io_wait_for_cmd(). The parameters correspond to
* the same-named parameters of those two functions.
*/
svn_error_t *
svn_io_run_cmd(const char *path,
const char *cmd,
const char *const *args,
int *exitcode,
apr_exit_why_e *exitwhy,
svn_boolean_t inherit,
apr_file_t *infile,
apr_file_t *outfile,
apr_file_t *errfile,
apr_pool_t *pool);
/** Invoke the configured @c diff program, with @a user_args (an array
* of utf8-encoded @a num_user_args arguments) if they are specified
* (that is, if @a user_args is non-NULL), or "-u" if they are not.
* If @a user_args is NULL, the value of @a num_user_args is ignored.
*
* Diff runs in utf8-encoded @a dir, and its exit status is stored in
* @a exitcode, if it is not @c NULL.
*
* If @a label1 and/or @a label2 are not NULL they will be passed to the diff
* process as the arguments of "-L" options. @a label1 and @a label2 are also
* in utf8, and will be converted to native charset along with the other args.
*
* @a from is the first file passed to diff, and @a to is the second. The
* stdout of diff will be sent to @a outfile, and the stderr to @a errfile.
*
* @a diff_cmd must be non-NULL.
*
* Do all allocation in @a pool.
* @since New in 1.6.0.
*/
svn_error_t *
svn_io_run_diff2(const char *dir,
const char *const *user_args,
int num_user_args,
const char *label1,
const char *label2,
const char *from,
const char *to,
int *exitcode,
apr_file_t *outfile,
apr_file_t *errfile,
const char *diff_cmd,
apr_pool_t *pool);
/** Similar to svn_io_run_diff2() but with @a diff_cmd encoded in internal
* encoding used by APR.
*
* @deprecated Provided for backwards compatibility with the 1.5 API. */
SVN_DEPRECATED
svn_error_t *
svn_io_run_diff(const char *dir,
const char *const *user_args,
int num_user_args,
const char *label1,
const char *label2,
const char *from,
const char *to,
int *exitcode,
apr_file_t *outfile,
apr_file_t *errfile,
const char *diff_cmd,
apr_pool_t *pool);
/** Invoke the configured @c diff3 program, in utf8-encoded @a dir
* like this:
*
* diff3 -E -m @a mine @a older @a yours > @a merged
*
* (See the diff3 documentation for details.)
*
* If @a user_args is non-NULL, replace "-E" with the <tt>const char*</tt>
* elements that @a user_args contains.
*
* @a mine, @a older and @a yours are utf8-encoded paths (relative to
* @a dir or absolute) to three files that already exist.
*
* @a merged is an open file handle, and is left open after the merge
* result is written to it. (@a merged should *not* be the same file
* as @a mine, or nondeterministic things may happen!)
( run in 3.018 seconds using v1.01-cache-2.11-cpan-d7f47b0818f )