这篇教程C++ svn_path_is_url函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中svn_path_is_url函数的典型用法代码示例。如果您正苦于以下问题:C++ svn_path_is_url函数的具体用法?C++ svn_path_is_url怎么用?C++ svn_path_is_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了svn_path_is_url函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: SVN_ERRstatic svn_error_t *ra_svn_handle_add_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const apr_array_header_t *params, ra_svn_driver_state_t *ds){ const char *path, *token, *file_token, *copy_path; svn_revnum_t copy_rev; ra_svn_token_entry_t *entry, *file_entry; SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "ccc(?cr)", &path, &token, &file_token, ©_path, ©_rev)); SVN_ERR(lookup_token(ds, token, FALSE, &entry)); ds->file_refs++; path = svn_relpath_canonicalize(path, pool); /* Some operations pass COPY_PATH as a full URL (commits, etc.). Others (replay, e.g.) deliver an fspath. That's ... annoying. */ if (copy_path) { if (svn_path_is_url(copy_path)) copy_path = svn_uri_canonicalize(copy_path, pool); else copy_path = svn_fspath__canonicalize(copy_path, pool); } file_entry = store_token(ds, NULL, file_token, TRUE, ds->file_pool); SVN_CMD_ERR(ds->editor->add_file(path, entry->baton, copy_path, copy_rev, ds->file_pool, &file_entry->baton)); return SVN_NO_ERROR;}
开发者ID:Alkzndr,项目名称:freebsd,代码行数:30,
示例2: l_movestatic intl_move (lua_State *L) { const char *src_path = luaL_checkstring (L, 1); const char *dest_path = luaL_checkstring (L, 2); const char *message = (lua_gettop (L) < 3 || lua_isnil (L, 3)) ? "" : luaL_checkstring (L, 3); apr_pool_t *pool; svn_error_t *err; svn_client_ctx_t *ctx; init_function (&ctx, &pool, L); src_path = svn_path_canonicalize (src_path, pool); dest_path = svn_path_canonicalize (dest_path, pool); svn_commit_info_t *commit_info = NULL; if (svn_path_is_url (dest_path)) { make_log_msg_baton (&(ctx->log_msg_baton2), message, NULL, ctx->config, pool, L); ctx->log_msg_func2 = log_msg_func2; } err = svn_client_move4 (&commit_info, src_path, dest_path, FALSE, ctx, pool); IF_ERROR_RETURN (err, pool, L); if (commit_info == NULL) { lua_pushnil (L); } else { lua_pushinteger (L, commit_info->revision); } svn_pool_destroy (pool); return 1;}
开发者ID:krfkeith,项目名称:luasvn,代码行数:35,
示例3: parse_local_repos_path/* Helper to parse local repository path. Try parsing next parameter * of OS as a local path to repository. If successfull *REPOS_PATH * will contain internal style path to the repository. */static svn_error_t *parse_local_repos_path (apr_getopt_t *os, const char ** repos_path, apr_pool_t *pool){ *repos_path = NULL; /* Check to see if there is one more parameter. */ if (os->ind < os->argc) { const char * path = os->argv[os->ind++]; SVN_ERR (svn_utf_cstring_to_utf8 (repos_path, path, pool)); *repos_path = svn_path_internal_style (*repos_path, pool); } if (*repos_path == NULL) { return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, _("Repository argument required")); } else if (svn_path_is_url (*repos_path)) { return svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, _("'%s' is an URL when it should be a path"), *repos_path); } return SVN_NO_ERROR; }
开发者ID:ejrh,项目名称:ejrh,代码行数:33,
示例4: svn_repos__retrieve_configsvn_error_t *svn_repos__retrieve_config(svn_config_t **cfg_p, const char *path, svn_boolean_t must_exist, svn_boolean_t case_sensitive, apr_pool_t *pool){ if (svn_path_is_url(path)) { const char *dirent; svn_error_t *err; apr_pool_t *scratch_pool = svn_pool_create(pool); err = svn_uri_get_dirent_from_file_url(&dirent, path, scratch_pool); if (err == SVN_NO_ERROR) err = authz_retrieve_config_repo(cfg_p, dirent, must_exist, case_sensitive, pool, scratch_pool); /* Close the repos and streams we opened. */ svn_pool_destroy(scratch_pool); return err; } else { /* Outside of repo file or Windows registry*/ SVN_ERR(svn_config_read3(cfg_p, path, must_exist, case_sensitive, case_sensitive, pool)); } return SVN_NO_ERROR;}
开发者ID:2asoft,项目名称:freebsd,代码行数:33,
示例5: svn_client_switch3svn_error_t *svn_client_switch3(svn_revnum_t *result_rev, const char *path, const char *switch_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_boolean_t ignore_ancestry, svn_client_ctx_t *ctx, apr_pool_t *pool){ svn_error_t *err; svn_boolean_t sleep_here = FALSE; if (svn_path_is_url(path)) return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL, _("'%s' is not a local path"), path); err = svn_client__switch_internal(result_rev, path, switch_url, peg_revision, revision, depth, depth_is_sticky, ignore_externals, allow_unver_obstructions, ignore_ancestry, &sleep_here, ctx, pool); /* Sleep to ensure timestamp integrity (we do this regardless of errors in the actual switch operation(s)). */ if (sleep_here) svn_io_sleep_for_timestamps(path, pool); return svn_error_trace(err);}
开发者ID:geofft,项目名称:subversion,代码行数:34,
示例6: svn_ra_neon__copy_hrefsvn_error_t *svn_ra_neon__copy_href(svn_stringbuf_t *dst, const char *src, apr_pool_t *pool){ /* parse the PATH element out of the URL and store it. ### do we want to verify the rest matches the current session? Note: mod_dav does not (currently) use an absolute URL, but simply a server-relative path (i.e. this uri_parse is effectively a no-op). */ apr_uri_t uri; apr_status_t apr_status; /* SRC can have trailing '/' */ if (svn_path_is_url(src)) src = svn_uri_canonicalize(src, pool); else src = svn_urlpath__canonicalize(src, pool); apr_status = apr_uri_parse(pool, src, &uri); if (apr_status != APR_SUCCESS) return svn_error_wrap_apr(apr_status, _("Unable to parse URL '%s'"), src); svn_stringbuf_setempty(dst); svn_stringbuf_appendcstr(dst, uri.path); return SVN_NO_ERROR;}
开发者ID:DJEX93,项目名称:dsploit,代码行数:32,
示例7: svn_cl__check_target_is_local_pathsvn_error_t *svn_cl__check_target_is_local_path(const char *target){ if (svn_path_is_url(target)) return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, _("'%s' is not a local path"), target); return SVN_NO_ERROR;}
开发者ID:2asoft,项目名称:freebsd,代码行数:8,
示例8: svn_error_createfsvn_error_t *JNIUtil::preprocessPath(const char *&path, apr_pool_t *pool){ /* URLs and wc-paths get treated differently. */ if (svn_path_is_url(path)) { /* No need to canonicalize a URL's case or path separators. */ /* Convert to URI. */ path = svn_path_uri_from_iri(path, pool); /* Auto-escape some ASCII characters. */ path = svn_path_uri_autoescape(path, pool); /* The above doesn't guarantee a valid URI. */ if (! svn_path_is_uri_safe(path)) return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("URL '%s' is not properly URI-encoded"), path); /* Verify that no backpaths are present in the URL. */ if (svn_path_is_backpath_present(path)) return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("URL '%s' contains a '..' element"), path); /* strip any trailing '/' */ path = svn_uri_canonicalize(path, pool); } else /* not a url, so treat as a path */ { /* Normalize path to subversion internal style */ /* ### In Subversion < 1.6 this method on Windows actually tried to lookup the path on disk to fix possible invalid casings in the passed path. (An extremely expensive operation; especially on network drives). This 'feature'is now removed as it penalizes every correct path passed, and also breaks behavior of e.g. 'svn status .' returns '!' file, because there is only a "File" on disk. But when you then call 'svn status file', you get '? File'. As JavaHL is designed to be platform independent I assume users don't want this broken behavior on non round-trippable paths, nor the performance penalty. */ path = svn_dirent_internal_style(path, pool); /* For kicks and giggles, let's absolutize it. */ SVN_ERR(svn_dirent_get_absolute(&path, path, pool)); } return NULL;}
开发者ID:Ranga123,项目名称:test1,代码行数:56,
示例9: check_root_url_of_target/* Attempt to find the repository root url for TARGET, possibly using CTX for * authentication. If one is found and *ROOT_URL is not NULL, then just check * that the root url for TARGET matches the value given in *ROOT_URL and * return an error if it does not. If one is found and *ROOT_URL is NULL then * set *ROOT_URL to the root url for TARGET, allocated from POOL. * If a root url is not found for TARGET because it does not exist in the * repository, then return with no error. * * TARGET is a UTF-8 encoded string that is fully canonicalized and escaped. */static svn_error_t *check_root_url_of_target(const char **root_url, const char *target, svn_client_ctx_t *ctx, apr_pool_t *pool){ svn_error_t *err; const char *tmp_root_url; const char *truepath; svn_opt_revision_t opt_rev; SVN_ERR(svn_opt_parse_path(&opt_rev, &truepath, target, pool)); if (!svn_path_is_url(truepath)) SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, pool)); err = svn_client__get_repos_root(&tmp_root_url, truepath, ctx, pool, pool); if (err) { /* It is OK if the given target does not exist, it just means * we will not be able to determine the root url from this particular * argument. * * If the target itself is a URL to a repository that does not exist, * that's fine, too. The callers will deal with this argument in an * appropriate manter if it does not make any sense. * * Also tolerate locally added targets ("bad revision" error). */ if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND) || (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY) || (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED) || (err->apr_err == SVN_ERR_CLIENT_BAD_REVISION)) { svn_error_clear(err); return SVN_NO_ERROR; } else return svn_error_trace(err); } if (*root_url && tmp_root_url) { if (strcmp(*root_url, tmp_root_url) != 0) return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL, _("All non-relative targets must have " "the same root URL")); } else *root_url = tmp_root_url; return SVN_NO_ERROR;}
开发者ID:DJEX93,项目名称:dsploit,代码行数:65,
|