You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/10 19:03:37 UTC
svn commit: r984122 [23/40] - in /subversion/branches/ignore-mergeinfo: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/generator/util/ build/hudson/
build/hudson/jobs/ build/hudson/jobs/subversion-1.6...
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/time.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/time.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/time.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/time.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* time.c: time/date utilities
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/token.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/token.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/token.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/token.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* token.c : value/string-token functions
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/user.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/user.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/user.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/user.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* user.c: APR wrapper functions for Subversion
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/username_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/username_providers.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/username_providers.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/username_providers.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* username_providers.c: providers for SVN_AUTH_CRED_USERNAME
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* utf.c: UTF-8 conversion routines
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -399,7 +399,7 @@ fuzzy_escape(const char *src, apr_size_t
src++;
}
- /* Allocate that amount. */
+ /* Allocate that amount, plus one slot for '\0' character. */
new = apr_palloc(pool, new_len + 1);
new_orig = new;
@@ -413,7 +413,7 @@ fuzzy_escape(const char *src, apr_size_t
function escapes different characters. Please keep in sync!
### If we add another fuzzy escape somewhere, we should abstract
### this out to a common function. */
- sprintf(new, "?\\%03u", (unsigned char) *src_orig);
+ apr_snprintf(new, 6, "?\\%03u", (unsigned char) *src_orig);
new += 5;
}
else
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf_validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf_validate.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf_validate.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/utf_validate.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* utf_validate.c: Validate a UTF-8 string
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/validate.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/validate.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/validate.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* validate.c: validation routines
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/version.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/version.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* version.c: library version number and utilities
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_crashrpt.c : provides information after a crash
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_crashrpt.h : shares the win32 crashhandler functions in libsvn_subr.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt_dll.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt_dll.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt_dll.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crashrpt_dll.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_crashrpt_dll.h : private header file.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crypto.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_crypto.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_crypto.c: win32 providers for SVN_AUTH_*
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -356,14 +356,28 @@ windows_validate_certificate(svn_boolean
chain_para.cbSize = sizeof(chain_para);
if (CertGetCertificateChain(NULL, cert_context, NULL, NULL, &chain_para,
- CERT_CHAIN_CACHE_END_CERT,
+ CERT_CHAIN_CACHE_END_CERT |
+ CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
NULL, &chain_context))
{
- if (chain_context->rgpChain[0]->TrustStatus.dwErrorStatus
- == CERT_TRUST_NO_ERROR)
+ CERT_CHAIN_POLICY_PARA policy_para;
+ CERT_CHAIN_POLICY_STATUS policy_status;
+
+ policy_para.cbSize = sizeof(policy_para);
+ policy_para.dwFlags = 0;
+ policy_para.pvExtraPolicyPara = NULL;
+
+ policy_status.cbSize = sizeof(policy_status);
+
+ if (CertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_SSL,
+ chain_context, &policy_para,
+ &policy_status))
{
- /* Windows think the certificate is valid. */
- *ok_p = TRUE;
+ if (policy_status.dwError == S_OK)
+ {
+ /* Windows thinks the certificate is valid. */
+ *ok_p = TRUE;
+ }
}
CertFreeCertificateChain(chain_context);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_xlate.c : Windows xlate stuff.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -156,7 +156,7 @@ svn_subr__win32_xlate_open(win32_xlate_t
UINT from_page_id, to_page_id;
apr_status_t apr_err = APR_SUCCESS;
win32_xlate_t *xlate;
-
+
apr_err = get_page_id_from_name(&to_page_id, topage, pool);
if (apr_err == APR_SUCCESS)
apr_err = get_page_id_from_name(&from_page_id, frompage, pool);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/win32_xlate.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* win32_xlate.h : Windows xlate stuff.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/xml.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/xml.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_subr/xml.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* xml.c: xml helper code shared among the Subversion libraries.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -301,7 +301,8 @@ svn_xml_fuzzy_escape(const char *string,
### should probably share code, even though they escape
### different characters.
*/
- sprintf(escaped_char, "?\\%03u", (unsigned char) *q);
+ apr_snprintf(escaped_char, sizeof(escaped_char), "?\\%03u",
+ (unsigned char) *q);
svn_stringbuf_appendcstr(outstr, escaped_char);
p = q + 1;
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_crawler.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_crawler.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* adm_crawler.c: report local WC mods to an Editor.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -49,7 +49,6 @@
#include "lock.h"
#include "svn_private_config.h"
-#include "private/svn_debug.h"
/* Helper for report_revisions_and_depths().
@@ -59,8 +58,8 @@
that file to LOCAL_ABSPATH with possible translations/expansions. If
USE_COMMIT_TIMES is set, then set working file's timestamp to
last-commit-time. Either way, set entry-timestamp to match that of
- the working file when all is finished.
-
+ the working file when all is finished.
+
Not that a valid access baton with a write lock to the directory of
LOCAL_ABSPATH must be available in DB.*/
static svn_error_t *
@@ -170,13 +169,13 @@ restore_file(svn_wc__db_t *db,
/* Try to restore LOCAL_ABSPATH of node type KIND and if successfull,
notify that the node is restored. Use DB for accessing the working copy.
- If USE_COMMIT_TIMES is set, then set working file's timestamp to
+ If USE_COMMIT_TIMES is set, then set working file's timestamp to
last-commit-time.
Set RESTORED to TRUE if the node is successfull restored. RESTORED will
be FALSE if restoring this node is not supported.
- This function does all temporary allocations in SCRATCH_POOL
+ This function does all temporary allocations in SCRATCH_POOL
*/
static svn_error_t *
restore_node(svn_boolean_t *restored,
@@ -370,7 +369,7 @@ report_revisions_and_depths(svn_wc__db_t
svn_depth_t this_depth;
svn_wc__db_lock_t *this_lock;
svn_boolean_t this_shadows_base, this_switched, replaced = FALSE;
-
+
/* Clear the iteration subpool here because the loop has a bunch
of 'continue' jump statements. */
@@ -397,7 +396,7 @@ report_revisions_and_depths(svn_wc__db_t
{
/* Report the excluded path, no matter whether report_everything
flag is set. Because the report_everything flag indicates
- that the server will treate the wc as empty and thus push
+ that the server will treat the wc as empty and thus push
full content of the files/subdirs. But we want to prevent the
server from pushing the full content of this_path at us. */
@@ -489,7 +488,7 @@ report_revisions_and_depths(svn_wc__db_t
/* Is the entry on disk? */
if (apr_hash_get(dirents, child, APR_HASH_KEY_STRING) == NULL)
{
- svn_boolean_t missing = FALSE;
+ svn_boolean_t missing = FALSE;
if (restore_files && this_status != svn_wc__db_status_deleted
&& !replaced)
{
@@ -725,7 +724,7 @@ find_base_rev(svn_revnum_t *base_rev,
SVN_ERR(svn_wc__db_read_info(&status, NULL, base_rev, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
&base_shadowed, NULL, NULL,
db, local_abspath, pool, pool));
@@ -993,7 +992,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
if (err)
goto abort_report;
- if (!parent_repos_relpath &&
+ if (!parent_repos_relpath &&
parent_status == svn_wc__db_status_added)
{
err = svn_wc__db_scan_addition(NULL, NULL,
@@ -1291,7 +1290,7 @@ svn_wc__internal_transmit_text_deltas(co
{
const char *text_base;
-
+
SVN_ERR(svn_wc__text_base_path(&text_base, db, local_abspath, FALSE,
scratch_pool));
@@ -1363,10 +1362,10 @@ svn_wc__internal_transmit_prop_deltas(sv
{
const svn_prop_t *p = &APR_ARRAY_IDX(propmods, i, svn_prop_t);
if (kind == svn_wc__db_kind_file)
- SVN_ERR(editor->change_file_prop(baton, p->name, p->value,
+ SVN_ERR(editor->change_file_prop(baton, p->name, p->value,
scratch_pool));
else
- SVN_ERR(editor->change_dir_prop(baton, p->name, p->value,
+ SVN_ERR(editor->change_dir_prop(baton, p->name, p->value,
scratch_pool));
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.c Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
* information is kept.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -302,7 +302,7 @@ svn_wc__get_revert_contents(svn_stream_t
apr_pool_t *scratch_pool)
{
const char *revert_base;
-
+
SVN_ERR(svn_wc__text_revert_path(&revert_base, db, local_abspath,
scratch_pool));
@@ -373,53 +373,28 @@ svn_wc__prop_path(const char **prop_path
/*** Opening and closing files in the adm area. ***/
-/* Open a file somewhere in the adm area for directory PATH.
- * First, add the adm subdir as the next component of PATH, then add
- * each of the varargs (they are char *'s), then add EXTENSION if it
- * is non-null, then open the resulting file as *STREAM.
- *
- * If FLAGS indicates writing, open the file in the adm tmp area.
- * This means the file will probably need to be renamed from there,
- * either by passing the sync flag to close_adm_file() later, or with
- * an explicit call to sync_adm_file().
- */
static svn_error_t *
open_adm_file(svn_stream_t **stream,
const char **selected_path,
const char *path,
+ const char *subdir,
+ const char *fname,
const char *extension,
- svn_boolean_t for_writing,
apr_pool_t *result_pool,
- apr_pool_t *scratch_pool,
- ...)
+ apr_pool_t *scratch_pool)
{
svn_error_t *err;
- va_list ap;
- /* If we're writing, always do it to a tmp file. */
- if (for_writing)
- {
- /* Extend with tmp name. */
- va_start(ap, scratch_pool);
- path = v_extend_with_adm_name(path, extension, TRUE, result_pool, ap);
- va_end(ap);
+ /* Extend with tmp name. */
+ path = extend_with_adm_name(path, extension, TRUE, result_pool,
+ subdir, fname, NULL);
- err = svn_stream_open_writable(stream, path, result_pool, scratch_pool);
- }
- else
- {
- /* Extend with regular adm name. */
- va_start(ap, scratch_pool);
- path = v_extend_with_adm_name(path, extension, FALSE, result_pool, ap);
- va_end(ap);
-
- err = svn_stream_open_readonly(stream, path, result_pool, scratch_pool);
- }
+ err = svn_stream_open_writable(stream, path, result_pool, scratch_pool);
if (selected_path)
*selected_path = path; /* note: built in result_pool */
- if (for_writing && err && APR_STATUS_IS_EEXIST(err->apr_err))
+ if (err && APR_STATUS_IS_EEXIST(err->apr_err))
{
/* Exclusive open failed, delete and retry */
svn_error_clear(err);
@@ -428,7 +403,7 @@ open_adm_file(svn_stream_t **stream,
}
/* Examine the error from the first and/or second attempt at opening. */
- if (for_writing && err && APR_STATUS_IS_ENOENT(err->apr_err))
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
{
/* If we receive a failure to open a file in our temporary directory,
* it may be because our temporary directories aren't created.
@@ -440,70 +415,22 @@ open_adm_file(svn_stream_t **stream,
"corrupt; run 'svn cleanup' and try again"));
}
- return err;
-}
-
-
-svn_error_t *
-svn_wc__open_adm_writable(svn_stream_t **stream,
- const char **temp_file_path,
- const char *path,
- const char *fname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- return open_adm_file(stream, temp_file_path, path, NULL /* extension */,
- TRUE /* for_writing */,
- result_pool, scratch_pool,
- fname, NULL);
-}
-
-
-svn_error_t *
-svn_wc__close_adm_stream(svn_stream_t *stream,
- const char *temp_file_path,
- const char *path,
- const char *fname,
- apr_pool_t *scratch_pool)
-{
- const char *dst_path = extend_with_adm_name(path, NULL, FALSE, scratch_pool,
- fname, NULL);
-
- SVN_ERR(svn_stream_close(stream));
-
- /* Put the completed file into its intended location. */
- SVN_ERR(svn_io_file_rename(temp_file_path, dst_path, scratch_pool));
- return svn_error_return(svn_io_set_file_read_only(dst_path, FALSE,
- scratch_pool));
-}
-
-
-svn_error_t *
-svn_wc__remove_adm_file(const char *dir_path,
- const char *filename,
- apr_pool_t *scratch_pool)
-{
- const char *path = svn_wc__adm_child(dir_path, filename, scratch_pool);
-
- return svn_error_return(svn_io_remove_file2(path, FALSE, scratch_pool));
+ return svn_error_return(err);
}
svn_error_t *
svn_wc__open_adm_stream(svn_stream_t **stream,
- const char *path,
+ const char *dir_abspath,
const char *fname,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- return open_adm_file(stream,
- NULL /* selected_path */,
- path,
- NULL /* extension */,
- FALSE /* for_writing */,
- result_pool, scratch_pool,
- fname,
- NULL);
+ const char *local_abspath;
+
+ local_abspath = svn_wc__adm_child(dir_abspath, fname, scratch_pool);
+ return svn_error_return(svn_stream_open_readonly(stream, local_abspath,
+ result_pool, scratch_pool));
}
@@ -522,14 +449,12 @@ svn_wc__open_writable_base(svn_stream_t
return open_adm_file(stream, temp_base_path,
parent_path,
+ SVN_WC__ADM_TEXT_BASE,
+ base_name,
need_revert_base
? SVN_WC__REVERT_EXT
: SVN_WC__BASE_EXT,
- TRUE /* for_writing */,
- result_pool, scratch_pool,
- SVN_WC__ADM_TEXT_BASE,
- base_name,
- NULL);
+ result_pool, scratch_pool);
}
@@ -559,39 +484,48 @@ init_adm_tmp_area(const char *path, apr_
marked as 'incomplete. The adm area starts out locked; remember to
unlock it when done. */
static svn_error_t *
-init_adm(const char *path,
- const char *uuid,
+init_adm(svn_wc__db_t *db,
+ const char *local_abspath,
const char *url,
- const char *repos,
+ const char *repos_root_url,
+ const char *repos_uuid,
svn_revnum_t initial_rev,
svn_depth_t depth,
apr_pool_t *pool)
{
+ const char *repos_relpath;
+
+ SVN_ERR_ASSERT(svn_uri_is_ancestor(repos_root_url, url));
+
/* First, make an empty administrative area. */
- SVN_ERR(svn_io_dir_make_hidden(svn_wc__adm_child(path, NULL, pool),
+ SVN_ERR(svn_io_dir_make_hidden(svn_wc__adm_child(local_abspath, NULL, pool),
APR_OS_DEFAULT, pool));
/** Make subdirectories. ***/
/* SVN_WC__ADM_TEXT_BASE */
- SVN_ERR(make_adm_subdir(path, SVN_WC__ADM_TEXT_BASE, FALSE, pool));
+ SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_TEXT_BASE, FALSE, pool));
/* SVN_WC__ADM_PROP_BASE */
- SVN_ERR(make_adm_subdir(path, SVN_WC__ADM_PROP_BASE, FALSE, pool));
+ SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_PROP_BASE, FALSE, pool));
/* SVN_WC__ADM_PROPS */
- SVN_ERR(make_adm_subdir(path, SVN_WC__ADM_PROPS, FALSE, pool));
+ SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_PROPS, FALSE, pool));
- /** Init the tmp area. ***/
- SVN_ERR(init_adm_tmp_area(path, pool));
+ /* SVN_WC__ADM_PRISTINE */
+ SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_PRISTINE, FALSE, pool));
- /** Initialize each administrative file. */
+ /** Init the tmp area. ***/
+ SVN_ERR(init_adm_tmp_area(local_abspath, pool));
- /* SVN_WC__ADM_ENTRIES */
- /* THIS FILE MUST BE CREATED LAST:
- After this exists, the dir is considered complete. */
- SVN_ERR(svn_wc__entries_init(path, uuid, url, repos,
- initial_rev, depth, pool));
+ /* Lastly, create the SDB. */
+ repos_relpath = svn_uri_is_child(repos_root_url, url, pool);
+ SVN_ERR(svn_wc__db_init(db, local_abspath,
+ repos_relpath == NULL
+ ? ""
+ : svn_path_uri_decode(repos_relpath, pool),
+ repos_root_url, repos_uuid, initial_rev, depth,
+ pool));
return SVN_NO_ERROR;
}
@@ -599,9 +533,9 @@ init_adm(const char *path,
svn_error_t *
svn_wc__internal_ensure_adm(svn_wc__db_t *db,
const char *local_abspath,
- const char *uuid,
const char *url,
- const char *repos,
+ const char *repos_root_url,
+ const char *repos_uuid,
svn_revnum_t revision,
svn_depth_t depth,
apr_pool_t *scratch_pool)
@@ -610,14 +544,16 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
int format;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ SVN_ERR_ASSERT(repos_root_url != NULL);
+ SVN_ERR_ASSERT(repos_uuid != NULL);
SVN_ERR(svn_wc__internal_check_wc(&format, db, local_abspath, scratch_pool));
/* Early out: we know we're not dealing with an existing wc, so
just create one. */
if (format == 0)
- return init_adm(local_abspath, uuid, url, repos, revision, depth,
- scratch_pool);
+ return init_adm(db, local_abspath, url, repos_root_url, repos_uuid,
+ revision, depth, scratch_pool);
/* Now, get the existing url and repos for PATH. */
SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, FALSE, svn_node_unknown,
@@ -645,8 +581,8 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
if (strcmp(entry->url, url) != 0
&& (entry->copyfrom_url == NULL
|| strcmp(entry->copyfrom_url, url) != 0)
- && ((repos != NULL && !svn_uri_is_ancestor(repos, entry->url))
- || strcmp(entry->uuid, uuid) != 0))
+ && (!svn_uri_is_ancestor(repos_root_url, entry->url)
+ || strcmp(entry->uuid, repos_uuid) != 0))
{
return
svn_error_createf
@@ -662,38 +598,33 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
svn_error_t *
svn_wc_ensure_adm4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
- const char *uuid,
const char *url,
- const char *repos,
+ const char *repos_root_url,
+ const char *repos_uuid,
svn_revnum_t revision,
svn_depth_t depth,
apr_pool_t *scratch_pool)
{
return svn_error_return(
- svn_wc__internal_ensure_adm(wc_ctx->db, local_abspath, uuid, url, repos,
- revision, depth, scratch_pool));
+ svn_wc__internal_ensure_adm(wc_ctx->db, local_abspath, url, repos_root_url,
+ repos_uuid, revision, depth, scratch_pool));
}
svn_error_t *
-svn_wc__adm_destroy(svn_wc_adm_access_t *adm_access,
+svn_wc__adm_destroy(svn_wc__db_t *db,
+ const char *dir_abspath,
apr_pool_t *scratch_pool)
{
- const char *path, *local_abspath;
- svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
+ const char *adm_abspath;
- SVN_ERR(svn_wc__write_check(db, svn_wc__adm_access_abspath(adm_access),
- scratch_pool));
+ SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
/* Well, the coast is clear for blowing away the administrative
- directory, which also removes the lock file */
- path = svn_wc__adm_child(svn_wc_adm_access_path(adm_access), NULL,
- scratch_pool);
- local_abspath = svn_wc__adm_access_abspath(adm_access);
-
- SVN_ERR(svn_wc_adm_close2(adm_access, scratch_pool));
- SVN_ERR(svn_wc__db_temp_forget_directory(db, local_abspath, scratch_pool));
+ directory, which also removes the lock */
+ SVN_ERR(svn_wc__db_temp_forget_directory(db, dir_abspath, scratch_pool));
- SVN_ERR(svn_io_remove_dir2(path, FALSE, NULL, NULL, scratch_pool));
+ adm_abspath = svn_wc__adm_child(dir_abspath, NULL, scratch_pool);
+ SVN_ERR(svn_io_remove_dir2(adm_abspath, FALSE, NULL, NULL, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_files.h Tue Aug 10 17:03:06 2010
@@ -5,10 +5,10 @@
* something via these interfaces, something's wrong.)
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -108,56 +108,14 @@ svn_error_t *svn_wc__prop_path(const cha
/*** Opening all kinds of adm files ***/
-/* Yo, read this if you open and close files in the adm area:
- *
- * ### obsolete documentation. see implementation for now. this entire
- * ### section is likely to be tossed out "soon".
- *
- * When you open a file for writing with svn_wc__open_foo(), the file
- * is actually opened in the corresponding location in the tmp/
- * directory. Opening with APR_APPEND is not supported. You are
- * guaranteed to be the owner of the new file.
- *
- * Somehow, this tmp file must eventually get renamed to its real
- * destination in the adm area. You can do it either by passing the
- * SYNC flag to svn_wc__close_foo(), or by calling
- * svn_wc__sync_foo() (though of course you should still have
- * called svn_wc__close_foo() first, just without the SYNC flag).
- *
- * In other words, the adm area is only capable of modifying files
- * atomically, but you get some control over when the rename happens.
- */
-
-/* Open `PATH/<adminstrative_subdir>/FNAME'. Note: STREAM and TEMP_FILE_PATH
- should be passed to svn_wc__close_adm_stream when you're done writing. */
-svn_error_t *svn_wc__open_adm_writable(svn_stream_t **stream,
- const char **temp_file_path,
- const char *path,
- const char *fname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/* Close `PATH/<adminstrative_subdir>/FNAME'. */
-svn_error_t *svn_wc__close_adm_stream(svn_stream_t *stream,
- const char *temp_file_path,
- const char *path,
- const char *fname,
- apr_pool_t *scratch_pool);
-
/* Open `PATH/<adminstrative_subdir>/FNAME'. */
svn_error_t *svn_wc__open_adm_stream(svn_stream_t **stream,
- const char *path,
+ const char *dir_abspath,
const char *fname,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Remove `DIR_PATH/<adminstrative_subdir>/FILENAME'. */
-svn_error_t *svn_wc__remove_adm_file(const char *dir_path,
- const char *filename,
- apr_pool_t *scratch_pool);
-
-
/* Open the normal or revert text base, associated with PATH, for writing.
The selection is based on NEED_REVERT_BASE. The opened stream will be
returned in STREAM and the selected path will be returned in,
@@ -172,10 +130,9 @@ svn_wc__open_writable_base(svn_stream_t
apr_pool_t *scratch_pool);
-/* Blow away the admistrative directory associated with the access baton
- ADM_ACCESS. This closes ADM_ACCESS, but it is safe to close ADM_ACCESS
- again, after calling this function. */
-svn_error_t *svn_wc__adm_destroy(svn_wc_adm_access_t *adm_access,
+/* Blow away the admistrative directory associated with DIR_ABSPATH */
+svn_error_t *svn_wc__adm_destroy(svn_wc__db_t *db,
+ const char *dir_abspath,
apr_pool_t *scratch_pool);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.c Tue Aug 10 17:03:06 2010
@@ -7,10 +7,10 @@
* file in the working copy).
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -156,7 +156,7 @@ tweak_entries(svn_wc__db_t *db,
/* If a file, or deleted, excluded or absent dir, then tweak the
entry but don't recurse.
-
+
### how does this translate into wc_db land? */
if (kind == svn_wc__db_kind_file
|| status == svn_wc__db_status_not_present
@@ -1221,7 +1221,7 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
}
/* else
### Handle added directory that is deleted in parent_access
- (was_deleted=TRUE). The current behavior is to just delete the
+ (was_deleted=TRUE). The current behavior is to just delete the
directory with its administrative area inside, which is OK for WC-1.0,
but when we move to a single database per working copy something
must unversion the directory. */
@@ -1297,8 +1297,8 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
if (kind == svn_wc__db_kind_dir && was_add)
{
/* We have to release the WC-DB handles, to allow removing
- the directory on windows.
-
+ the directory on windows.
+
A better solution would probably be to call svn_wc__adm_destroy()
in the right place, but we can't do that without breaking the API. */
@@ -1388,6 +1388,7 @@ mark_tree_copied(svn_wc__db_t *db,
{
const char *child_basename = APR_ARRAY_IDX(children, i, const char *);
const char *child_abspath;
+ apr_hash_t *props;
svn_boolean_t hidden;
/* Clear our per-iteration pool. */
@@ -1406,7 +1407,7 @@ mark_tree_copied(svn_wc__db_t *db,
/* Skip deleted items. */
if (entry->schedule == svn_wc_schedule_delete)
continue;
-
+
/* If this is a directory, recurse. */
if (entry->kind == svn_node_dir)
{
@@ -1415,15 +1416,25 @@ mark_tree_copied(svn_wc__db_t *db,
iterpool));
}
+ /* Store the pristine properties to install them on working, because
+ we might delete the base table */
+ if (entry->kind != svn_node_dir)
+ SVN_ERR(svn_wc__db_read_pristine_props(&props, db, child_abspath,
+ iterpool, iterpool));
tmp_entry.copied = TRUE;
SVN_ERR(svn_wc__entry_modify2(db, child_abspath, svn_node_unknown,
TRUE, &tmp_entry,
SVN_WC__ENTRY_MODIFY_COPIED,
iterpool));
- /* Remove now obsolete dav cache values. */
- SVN_ERR(svn_wc__db_base_set_dav_cache(db, child_abspath, NULL,
- iterpool));
+ /* Reinstall the pristine properties on working */
+ if (entry->kind != svn_node_dir)
+ SVN_ERR(svn_wc__db_temp_op_set_pristine_props(db, child_abspath, props,
+ TRUE, iterpool));
+
+ /* Remove now obsolete dav cache values. */
+ SVN_ERR(svn_wc__db_base_set_dav_cache(db, child_abspath, NULL,
+ iterpool));
}
/* Handle "this dir" for states that need it done post-recursion. */
@@ -1433,11 +1444,21 @@ mark_tree_copied(svn_wc__db_t *db,
/* If setting the COPIED flag, skip deleted items. */
if (entry->schedule != svn_wc_schedule_delete)
{
+ apr_hash_t *props;
tmp_entry.copied = TRUE;
+ /* Store the pristine properties to install them on working, because
+ we might delete the base table */
+ SVN_ERR(svn_wc__db_read_pristine_props(&props, db, dir_abspath,
+ iterpool, iterpool));
+
SVN_ERR(svn_wc__entry_modify2(db, dir_abspath, svn_node_dir, FALSE,
&tmp_entry, SVN_WC__ENTRY_MODIFY_COPIED,
iterpool));
+
+ /* Reinstall the pristine properties on working */
+ SVN_ERR(svn_wc__db_temp_op_set_pristine_props(db, dir_abspath, props,
+ TRUE, iterpool));
}
/* Destroy our per-iteration pool. */
@@ -1468,6 +1489,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
svn_wc__db_status_t status;
svn_wc__db_kind_t db_kind;
svn_boolean_t exists;
+ apr_hash_t *props;
svn_dirent_split(local_abspath, &parent_abspath, &base_name, pool);
if (svn_wc_is_adm_dir(base_name, pool))
@@ -1608,6 +1630,14 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
tmp_entry.kind = kind;
tmp_entry.schedule = svn_wc_schedule_add;
+
+ /* Store the pristine properties to install them on working, because
+ we might delete the base table */
+ if ((exists && status != svn_wc__db_status_not_present)
+ && !is_replace && copyfrom_url != NULL)
+ SVN_ERR(svn_wc__db_read_pristine_props(&props, db, local_abspath,
+ pool, pool));
+
/* Now, add the entry for this item to the parent_dir's
entries file, marking it for addition. */
SVN_ERR(svn_wc__entry_modify2(db, local_abspath, kind,
@@ -1620,7 +1650,8 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
/* ### this is totally bogus. we clear these cuz turds might have been
### left around. thankfully, this will be properly managed during the
### wc-ng upgrade process. for now, we try to compensate... */
- if ((exists || is_replace) && copyfrom_url == NULL)
+ if (((exists && status != svn_wc__db_status_not_present) || is_replace)
+ && copyfrom_url == NULL)
SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_working,
pool));
@@ -1656,8 +1687,8 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
/* Make sure this new directory has an admistrative subdirectory
created inside of it */
SVN_ERR(svn_wc__internal_ensure_adm(db, local_abspath,
- parent_entry->uuid,
- new_url, parent_entry->repos, 0,
+ new_url, parent_entry->repos,
+ parent_entry->uuid, 0,
depth, pool));
}
else
@@ -1667,8 +1698,9 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
contain the copyfrom settings. So we need to pass the
copyfrom arguments to the ensure call. */
SVN_ERR(svn_wc__internal_ensure_adm(db, local_abspath,
- parent_entry->uuid, copyfrom_url,
+ copyfrom_url,
parent_entry->repos,
+ parent_entry->uuid,
copyfrom_rev, depth, pool));
}
@@ -1749,6 +1781,20 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
}
}
+ /* Set the pristine properties in WORKING_NODE, by copying them from the
+ deleted BASE_NODE record. Or set them to empty to make sure we don't
+ inherit wrong properties from BASE */
+ if (exists && status != svn_wc__db_status_not_present)
+ {
+ if (!is_replace && copyfrom_url != NULL)
+ SVN_ERR(svn_wc__db_temp_op_set_pristine_props(db, local_abspath, props,
+ TRUE, pool));
+ else
+ SVN_ERR(svn_wc__db_temp_op_set_pristine_props(db, local_abspath,
+ apr_hash_make(pool),
+ TRUE, pool));
+ }
+
/* Report the addition to the caller. */
if (notify_func != NULL)
{
@@ -2174,7 +2220,7 @@ revert_internal(svn_wc__db_t *db,
iterpool));
/* Skip subdirectories if we're called with depth-files. */
- if ((depth == svn_depth_files) &&
+ if ((depth == svn_depth_files) &&
(db_kind != svn_wc__db_kind_file) &&
(db_kind != svn_wc__db_kind_symlink))
continue;
@@ -2291,7 +2337,7 @@ svn_wc__get_pristine_contents(svn_stream
apr_pool_t *scratch_pool)
{
const char *text_base;
-
+
SVN_ERR(svn_wc__text_base_path(&text_base, db, local_abspath, FALSE,
scratch_pool));
@@ -2389,7 +2435,7 @@ svn_wc__internal_remove_from_revision_co
if (destroy_wf)
{
/* Don't kill local mods. */
- if (text_modified_p || (! wc_special && local_special))
+ if ((! wc_special && local_special) || text_modified_p)
return svn_error_create(SVN_ERR_WC_LEFT_LOCAL_MOD, NULL, NULL);
else /* The working file is still present; remove it. */
SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
@@ -2399,8 +2445,8 @@ svn_wc__internal_remove_from_revision_co
else if (svn_wc__adm_missing(db, local_abspath, scratch_pool))
{
/* The directory is missing so don't try to recurse,
- just delete the entry in the parent directory.
-
+ just delete the entry in the parent directory.
+
### This case disappears after we move to one DB. */
SVN_ERR(svn_wc__entry_remove(db, local_abspath, scratch_pool));
}
@@ -2482,12 +2528,7 @@ svn_wc__internal_remove_from_revision_co
/* Remove the entire administrative .svn area, thereby removing
_this_ dir from revision control too. */
- {
- svn_wc_adm_access_t *adm_access =
- svn_wc__adm_retrieve_internal2(db, local_abspath, iterpool);
-
- SVN_ERR(svn_wc__adm_destroy(adm_access, iterpool));
- }
+ SVN_ERR(svn_wc__adm_destroy(db, local_abspath, iterpool));
/* If caller wants us to recursively nuke everything on disk, go
ahead, provided that there are no dangling local-mod files
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/adm_ops.h Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
*
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/ambient_depth_filter_editor.c Tue Aug 10 17:03:06 2010
@@ -4,10 +4,10 @@
* *ambient* depth-based filtering
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -522,7 +522,7 @@ apply_textdelta(void *file_baton,
return eb->wrapped_editor->apply_textdelta(fb->wrapped_baton,
base_checksum, pool,
- handler, handler_baton);;
+ handler, handler_baton);
}
static svn_error_t *
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/conflicts.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/conflicts.c Tue Aug 10 17:03:06 2010
@@ -1,13 +1,13 @@
/*
* conflicts.c: routines for managing conflict data.
* NOTE: this code doesn't know where the conflict is
- * actually stored.
+ * actually stored.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -60,7 +60,7 @@ struct svn_wc_conflict_t
svn_wc_conflict_kind_t kind;
/* When describing a property conflict the property name
- or "" when no property name is available. (Upgrade from old WC or
+ or "" when no property name is available. (Upgrade from old WC or
raised via compatibility apis). */
const char *property_name;
@@ -341,6 +341,24 @@ resolve_conflict_on_node(svn_wc__db_t *d
&auto_resolve_src,
temp_dir, svn_io_file_del_none,
pool, pool));
+
+ /* ### If any of these paths isn't absolute, treat it
+ * ### as relative to CONFLICT_DIR_ABSPATH.
+ * ### Else we end up erroring out here, e.g. if the file
+ * ### is just a basename, and does not live in the current
+ * ### working directory.
+ * ### The API docs are unclear about whether these paths
+ * ### must be absolute or not. */
+ if (! svn_dirent_is_absolute(conflict_old))
+ conflict_old = svn_dirent_join(conflict_dir_abspath,
+ conflict_old, pool);
+ if (! svn_dirent_is_absolute(conflict_working))
+ conflict_working = svn_dirent_join(conflict_dir_abspath,
+ conflict_working, pool);
+ if (! svn_dirent_is_absolute(conflict_new))
+ conflict_new = svn_dirent_join(conflict_dir_abspath,
+ conflict_new, pool);
+
SVN_ERR(svn_diff_file_diff3_2(&diff,
conflict_old,
conflict_working,
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/context.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/context.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/context.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/context.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* context.c: routines for managing a working copy context
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -64,7 +64,7 @@ svn_wc_context_create(svn_wc_context_t *
apr_pool_t *scratch_pool)
{
svn_wc_context_t *ctx = apr_pcalloc(result_pool, sizeof(*ctx));
-
+
/* Create the state_pool, and open up a wc_db in it. */
ctx->state_pool = result_pool;
SVN_ERR(svn_wc__db_open(&ctx->db, svn_wc__db_openmode_readwrite, config,
@@ -108,7 +108,7 @@ svn_error_t *
svn_wc_context_destroy(svn_wc_context_t *wc_ctx)
{
/* We added a cleanup when creating; just run it now to close the context. */
- apr_pool_cleanup_run(wc_ctx->state_pool, wc_ctx, close_ctx_apr);;
+ apr_pool_cleanup_run(wc_ctx->state_pool, wc_ctx, close_ctx_apr);
return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/copy.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/copy.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* copy.c: wc 'copy' functionality.
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -56,7 +56,7 @@ copy_props(svn_wc__db_t *db,
apr_hash_t *props;
apr_hash_index_t *hi;
- SVN_ERR(svn_wc__load_props(NULL, &props, NULL, db, src_abspath,
+ SVN_ERR(svn_wc__load_props(NULL, &props, db, src_abspath,
scratch_pool, scratch_pool));
for (hi = apr_hash_first(scratch_pool, props); hi; hi = apr_hash_next(hi))
{
@@ -184,7 +184,7 @@ copy_added_dir_administratively(svn_wc_c
SVN_ERR(svn_io_get_dirents2(&dirents, src_abspath, scratch_pool));
/* Read src_path's entries one by one. */
- for (hi = apr_hash_first(scratch_pool, dirents);
+ for (hi = apr_hash_first(scratch_pool, dirents);
hi;
hi = apr_hash_next(hi))
{
@@ -258,114 +258,85 @@ copy_added_dir_administratively(svn_wc_c
return SVN_NO_ERROR;
}
-
-/* Helper function for copy_file_administratively() and
- copy_dir_administratively(). Determines the COPYFROM_URL and
- COPYFROM_REV of a file or directory SRC_PATH which is the descendant
- of an explicitly moved or copied directory that has not been committed.
-*/
-static svn_error_t *
-get_copyfrom_url_rev_via_parent(const char **copyfrom_url,
- svn_revnum_t *copyfrom_rev,
- svn_wc__db_t *db,
- const char *src_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *parent_abspath;
- const char *rest;
-
- svn_dirent_split(src_abspath, &parent_abspath, &rest, scratch_pool);
-
- *copyfrom_url = NULL;
-
- while (! *copyfrom_url)
- {
- const svn_wc_entry_t *entry;
-
- SVN_ERR(svn_wc__get_entry(&entry, db, parent_abspath, FALSE,
- svn_node_unknown, FALSE, scratch_pool,
- scratch_pool));
-
- if (entry->copyfrom_url)
- {
- *copyfrom_url = svn_uri_join(entry->copyfrom_url, rest, result_pool);
- *copyfrom_rev = entry->copyfrom_rev;
- }
- else
- {
- const char *last_parent_abspath = parent_abspath;
-
- rest = svn_dirent_join(svn_dirent_basename(parent_abspath,
- scratch_pool),
- rest, scratch_pool);
- parent_abspath = svn_dirent_dirname(parent_abspath, scratch_pool);
-
- if (strcmp(parent_abspath, last_parent_abspath) == 0)
- {
- /* If this happens, it probably means that parent_path is "".
- But there's no reason to limit ourselves to just that case;
- given everything else that's going on in this function, a
- strcmp() is pretty cheap, and the result we're trying to
- prevent is an infinite loop if svn_dirent_dirname() returns
- its input unchanged. */
- return svn_error_createf(
- SVN_ERR_WC_COPYFROM_PATH_NOT_FOUND, NULL,
- _("no parent with copyfrom information found above '%s'"),
- svn_dirent_local_style(src_abspath, scratch_pool));
- }
- }
- }
-
- return SVN_NO_ERROR;
-}
-
/* A helper for copy_file_administratively() which sets *COPYFROM_URL
and *COPYFROM_REV appropriately (possibly to NULL/SVN_INVALID_REVNUM).
- DST_ENTRY may be NULL. */
-static APR_INLINE svn_error_t *
+ DST_URL may be NULL, in which case DST_REVISION is ignored. */
+static svn_error_t *
determine_copyfrom_info(const char **copyfrom_url,
svn_revnum_t *copyfrom_rev,
svn_wc__db_t *db,
const char *src_abspath,
- const svn_wc_entry_t *src_entry,
- const svn_wc_entry_t *dst_entry,
+ const char *dst_url,
+ svn_revnum_t dst_revision,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const char *url;
- svn_revnum_t rev;
-
- if (src_entry->copyfrom_url)
+ const char *original_root_url;
+ const char *original_repos_relpath;
+ svn_revnum_t original_revision;
+ svn_wc__db_status_t status;
+
+ url = NULL;
+ original_revision = SVN_INVALID_REVNUM;
+
+ SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, &original_repos_relpath,
+ &original_root_url, NULL, &original_revision,
+ NULL, NULL, NULL, NULL, NULL, db, src_abspath,
+ scratch_pool, scratch_pool));
+ if (original_root_url && original_repos_relpath)
{
/* When copying/moving a file that was already explicitly
copied/moved then we know the URL it was copied from... */
- url = src_entry->copyfrom_url;
- rev = src_entry->copyfrom_rev;
+ url = svn_path_url_add_component2(original_root_url,
+ original_repos_relpath, scratch_pool);
}
- else
+ else if (status == svn_wc__db_status_added
+ || status == svn_wc__db_status_obstructed_add)
{
/* ...But if this file is merely the descendant of an explicitly
copied/moved directory, we need to do a bit more work to
determine copyfrom_url and copyfrom_rev. */
- SVN_ERR(get_copyfrom_url_rev_via_parent(&url, &rev, db, src_abspath,
- scratch_pool, scratch_pool));
+ const char *op_root_abspath;
+
+ SVN_ERR(svn_wc__db_scan_addition(&status, &op_root_abspath, NULL, NULL,
+ NULL, &original_repos_relpath,
+ &original_root_url, NULL,
+ &original_revision, db, src_abspath,
+ scratch_pool, scratch_pool));
+ if (status == svn_wc__db_status_copied ||
+ status == svn_wc__db_status_moved_here)
+ {
+ const char *src_parent_url;
+ const char *src_relpath;
+
+ src_parent_url = svn_path_url_add_component2(original_root_url,
+ original_repos_relpath,
+ scratch_pool);
+ src_relpath = svn_dirent_is_child(op_root_abspath, src_abspath,
+ scratch_pool);
+ if (src_relpath)
+ url = svn_path_url_add_component2(src_parent_url, src_relpath,
+ scratch_pool);
+ }
}
- if (dst_entry && rev == dst_entry->revision &&
- strcmp(url, dst_entry->url) == 0)
+ if (url && dst_url && strcmp(url, dst_url) == 0 &&
+ original_revision == dst_revision)
{
/* Suppress copyfrom info when the copy source is the same as
for the destination. */
url = NULL;
- rev = SVN_INVALID_REVNUM;
+ original_revision = SVN_INVALID_REVNUM;
}
if (url)
*copyfrom_url = apr_pstrdup(result_pool, url);
else
*copyfrom_url = NULL;
- *copyfrom_rev = rev;
+ *copyfrom_rev = original_revision;
return SVN_NO_ERROR;
}
@@ -448,13 +419,19 @@ copy_file_administratively(svn_wc_contex
apr_hash_t *props, *base_props;
svn_stream_t *base_contents;
svn_stream_t *contents;
+ svn_boolean_t src_exists;
+
+ src_exists = TRUE;
/* Are we moving or copying a file that is already moved or copied
but not committed? */
if (src_entry->copied)
{
SVN_ERR(determine_copyfrom_info(©from_url, ©from_rev, db,
- src_abspath, src_entry, dst_entry,
+ src_abspath,
+ dst_entry ? dst_entry->url : NULL,
+ dst_entry ? dst_entry->revision
+ : SVN_INVALID_REVNUM,
scratch_pool, scratch_pool));
}
else
@@ -465,7 +442,7 @@ copy_file_administratively(svn_wc_contex
}
/* Load source base and working props. */
- SVN_ERR(svn_wc__load_props(&base_props, &props, NULL, db,
+ SVN_ERR(svn_wc__load_props(&base_props, &props, db,
src_abspath, scratch_pool, scratch_pool));
/* Copy working copy file to temporary location */
@@ -483,7 +460,7 @@ copy_file_administratively(svn_wc_contex
svn_subst_eol_style_t eol_style;
const char *eol_str;
apr_hash_t *keywords;
-
+
SVN_ERR(svn_wc__get_keywords(&keywords, db, src_abspath, NULL,
scratch_pool, scratch_pool));
SVN_ERR(svn_wc__get_eol_style(&eol_style, &eol_str, db,
@@ -497,6 +474,8 @@ copy_file_administratively(svn_wc_contex
{
svn_error_clear(err);
+ src_exists = FALSE;
+
err = svn_wc__get_pristine_contents(&contents, db, src_abspath,
scratch_pool, scratch_pool);
@@ -542,6 +521,8 @@ copy_file_administratively(svn_wc_contex
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
+
+ SVN_ERR(svn_io_copy_perms(src_abspath, dst_abspath, scratch_pool));
}
/* Report the addition to the caller. */
@@ -765,7 +746,10 @@ copy_dir_administratively(svn_wc_context
svn_node_dir, TRUE,
scratch_pool, scratch_pool));
SVN_ERR(determine_copyfrom_info(©from_url, ©from_rev, db,
- src_abspath, src_entry, dst_entry,
+ src_abspath,
+ dst_entry ? dst_entry->url : NULL,
+ dst_entry ? dst_entry->revision
+ : SVN_INVALID_REVNUM,
scratch_pool, scratch_pool));
/* The URL for a copied dir won't exist in the repository, which
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/crop.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/crop.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* crop.c: Cropping the WC
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -335,17 +335,6 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
_("Can only crop a working copy with a restrictive depth"));
{
- svn_boolean_t hidden;
- SVN_ERR(svn_wc__db_node_hidden(&hidden, db, local_abspath, scratch_pool));
-
- if (hidden)
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
- _("The node '%s' was not found."),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
- }
-
- {
svn_wc__db_status_t status;
svn_wc__db_kind_t kind;
@@ -360,6 +349,13 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Can only crop directories"));
+ if (status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_absent)
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ _("The node '%s' was not found."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
if (status == svn_wc__db_status_deleted ||
status == svn_wc__db_status_obstructed_delete)
return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/deprecated.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/deprecated.c Tue Aug 10 17:03:06 2010
@@ -3,10 +3,10 @@
* "we can't lose 'em, but we can shun 'em!"
*
* ====================================================================
- * Licensed to the Subversion Corporation (SVN Corp.) under one
+ * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The SVN Corp. licenses this file
+ * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@@ -443,7 +443,7 @@ svn_wc_transmit_prop_deltas(const char *
svn_wc__adm_get_db(adm_access),
pool));
- SVN_ERR(svn_wc_transmit_prop_deltas2(wc_ctx, local_abspath, editor, baton,
+ SVN_ERR(svn_wc_transmit_prop_deltas2(wc_ctx, local_abspath, editor, baton,
pool));
return svn_error_return(svn_wc_context_destroy(wc_ctx));
@@ -462,10 +462,15 @@ svn_wc_ensure_adm3(const char *path,
const char *local_abspath;
svn_wc_context_t *wc_ctx;
+ if (uuid == NULL)
+ return svn_error_create(SVN_ERR_BAD_UUID, NULL, NULL);
+ if (repos == NULL)
+ return svn_error_create(SVN_ERR_BAD_URL, NULL, NULL);
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
SVN_ERR(svn_wc_context_create(&wc_ctx, NULL /* config */, pool, pool));
- SVN_ERR(svn_wc_ensure_adm4(wc_ctx, local_abspath, uuid, url, repos, revision,
+ SVN_ERR(svn_wc_ensure_adm4(wc_ctx, local_abspath, url, repos, uuid, revision,
depth, pool));
return svn_error_return(svn_wc_context_destroy(wc_ctx));
@@ -973,7 +978,7 @@ svn_wc_remove_lock(const char *path,
SVN_ERR(svn_wc_remove_lock2(wc_ctx, local_abspath, pool));
return svn_error_return(svn_wc_context_destroy(wc_ctx));
-
+
}
svn_error_t *
@@ -2814,7 +2819,7 @@ svn_wc_get_switch_editor3(svn_revnum_t *
allow_unver_obstructions,
diff3_cmd,
preserved_exts,
- NULL, NULL,
+ NULL, NULL,
conflict_func, conflict_baton,
external_func, eb,
cancel_func, cancel_baton,
@@ -3096,7 +3101,7 @@ svn_wc_translated_file2(const char **xla
svn_wc__adm_get_db(adm_access),
pool));
- SVN_ERR(svn_wc_translated_file3(xlated_path, src, wc_ctx, versioned_abspath,
+ SVN_ERR(svn_wc_translated_file3(xlated_path, src, wc_ctx, versioned_abspath,
flags, pool, pool));
if (! svn_dirent_is_absolute(versioned_file))
{
@@ -3232,7 +3237,7 @@ svn_wc_cleanup2(const char *path,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
SVN_ERR(svn_wc_context_create(&wc_ctx, NULL, pool, pool));
- SVN_ERR(svn_wc_cleanup3(wc_ctx, local_abspath, cancel_func,
+ SVN_ERR(svn_wc_cleanup3(wc_ctx, local_abspath, cancel_func,
cancel_baton, pool));
return svn_error_return(svn_wc_context_destroy(wc_ctx));