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 [18/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_fs_base/bdb/miscellaneous-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/miscellaneous-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/miscellaneous-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/miscellaneous-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* miscellaneous-table.h : internal interface to ops on `miscellaneous' table
*
* ====================================================================
- * 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_fs_base/bdb/node-origins-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* node-origins-table.c : operations on the `node-origins' table
*
* ====================================================================
- * 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_fs_base/bdb/node-origins-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/node-origins-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* node-origins-table.h : internal interface to ops on `node-origins' table
*
* ====================================================================
- * 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_fs_base/bdb/nodes-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* nodes-table.c : working with the `nodes' table
*
* ====================================================================
- * 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_fs_base/bdb/nodes-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/nodes-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* nodes-table.h : interface to `nodes' table
*
* ====================================================================
- * 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_fs_base/bdb/reps-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* reps-table.c : operations on the `representations' table
*
* ====================================================================
- * 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_fs_base/bdb/reps-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/reps-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* reps-table.h : internal interface to `representations' table
*
* ====================================================================
- * 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_fs_base/bdb/rev-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* rev-table.c : working with the `revisions' table
*
* ====================================================================
- * 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_fs_base/bdb/rev-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/rev-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* rev-table.h : internal interface to revision table operations
*
* ====================================================================
- * 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_fs_base/bdb/strings-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* strings-table.c : operations on the `strings' table
*
* ====================================================================
- * 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_fs_base/bdb/strings-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/strings-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* strings-table.h : internal interface to `strings' table
*
* ====================================================================
- * 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_fs_base/bdb/txn-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* txn-table.c : operations on the `transactions' table
*
* ====================================================================
- * 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_fs_base/bdb/txn-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/txn-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* txn-table.h : internal interface to ops on `transactions' table
*
* ====================================================================
- * 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_fs_base/bdb/uuids-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* uuids-table.c : operations on the `uuids' table
*
* ====================================================================
- * 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_fs_base/bdb/uuids-table.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/bdb/uuids-table.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* uuids-table.h : internal interface to `uuids' table
*
* ====================================================================
- * 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_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* dag.c : DAG-like interface filesystem, private to libsvn_fs
*
* ====================================================================
- * 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,6 +49,8 @@
#include "bdb/reps-table.h"
#include "bdb/strings-table.h"
#include "bdb/checksum-reps-table.h"
+#include "bdb/changes-table.h"
+#include "bdb/node-origins-table.h"
#include "private/svn_skel.h"
#include "private/svn_fs_util.h"
@@ -257,7 +259,7 @@ txn_body_dag_init_fs(void *baton,
svn_error_t *
svn_fs_base__dag_init_fs(svn_fs_t *fs)
{
- return svn_fs_base__retry_txn(fs, txn_body_dag_init_fs, NULL,
+ return svn_fs_base__retry_txn(fs, txn_body_dag_init_fs, NULL,
TRUE, fs->pool);
}
@@ -1625,6 +1627,160 @@ svn_fs_base__dag_commit_txn(svn_revnum_t
&date, trail, pool);
}
+/* Modify all entries in the "node-origins" table that have a txn-id of
+ * OLD_TXN_ID to refer to NEW_TXN_ID instead.
+ *
+ * Work within TRAIL. */
+static svn_error_t *
+node_origins_update(const char *new_txn_id,
+ const char *old_txn_id,
+ trail_t *trail,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *changes;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ int i;
+
+ /* To find the nodes that originate in the old txn, we'll look in the
+ * "changes" table. Any change that added a node could have created a new
+ * node id. */
+ SVN_ERR(svn_fs_bdb__changes_fetch_raw(&changes, trail->fs, old_txn_id, trail,
+ scratch_pool));
+ for (i = 0; i < changes->nelts; i++)
+ {
+ change_t *change = APR_ARRAY_IDX(changes, i, change_t *);
+
+ svn_pool_clear(iterpool);
+
+ if (change->kind == svn_fs_path_change_add
+ || change->kind == svn_fs_path_change_replace)
+ {
+ const svn_fs_id_t *origin_id;
+ const char *node_id, *id_copy_id, *id_txn_id;
+
+ /* Find the destination node id of this change */
+ node_id = svn_fs_base__id_node_id(change->noderev_id);
+
+ /* Fetch the old node-origin */
+ SVN_ERR(svn_fs_bdb__get_node_origin(&origin_id, trail->fs, node_id,
+ trail, iterpool));
+ id_copy_id = svn_fs_base__id_copy_id(origin_id);
+ id_txn_id = svn_fs_base__id_txn_id(origin_id);
+
+ if (svn_fs_base__key_compare(id_txn_id, old_txn_id) == 0)
+ {
+ /* Change its txn_id to NEW_TXN_ID */
+ origin_id = svn_fs_base__id_create(node_id, id_copy_id,
+ new_txn_id, iterpool);
+ /* Save the new node-origin */
+ SVN_ERR(svn_fs_bdb__delete_node_origin(trail->fs, node_id, trail,
+ iterpool));
+ SVN_ERR(svn_fs_bdb__set_node_origin(trail->fs, node_id,
+ origin_id, trail,
+ iterpool));
+ }
+ }
+ }
+
+ svn_pool_destroy(iterpool);
+ return SVN_NO_ERROR;
+}
+
+/* Modify each row in the "copies" table that is keyed by a (const char *)
+ * copy-id listed in COPY_IDS, changing the txn-id component of its
+ * "dst_noderev_id" field from OLD_TXN_ID to NEW_TXN_ID.
+ * Each entry in COPY_IDS must match exactly one row in the "copies" table.
+ *
+ * Work within TRAIL. */
+static svn_error_t *
+copies_update(const char *new_txn_id,
+ const char *old_txn_id,
+ apr_array_header_t *copy_ids,
+ trail_t *trail,
+ apr_pool_t *scratch_pool)
+{
+ int i;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+
+ for (i = 0; i < copy_ids->nelts; i++)
+ {
+ const char *copy_id = APR_ARRAY_IDX(copy_ids, i, const char *);
+ copy_t *copy;
+ const char *id_node_id, *id_copy_id, *id_txn_id;
+
+ svn_pool_clear(iterpool);
+
+ /* Get the old "copy" row from the "copies" table */
+ SVN_ERR(svn_fs_bdb__get_copy(©, trail->fs, copy_id, trail,
+ iterpool));
+
+ /* Modify it: change dst_noderev_id's txn_id from old to new txn-id */
+ id_node_id = svn_fs_base__id_node_id(copy->dst_noderev_id);
+ id_copy_id = svn_fs_base__id_copy_id(copy->dst_noderev_id);
+ id_txn_id = svn_fs_base__id_txn_id(copy->dst_noderev_id);
+ SVN_ERR_ASSERT(svn_fs_base__key_compare(id_copy_id, copy_id) == 0);
+ SVN_ERR_ASSERT(svn_fs_base__key_compare(id_txn_id, old_txn_id) == 0);
+ copy->dst_noderev_id = svn_fs_base__id_create(id_node_id, id_copy_id,
+ new_txn_id, iterpool);
+
+ /* Write the new "copy" row back under the same key (copy_id) */
+ SVN_ERR(svn_fs_bdb__create_copy(trail->fs, copy_id,
+ copy->src_path, copy->src_txn_id,
+ copy->dst_noderev_id, copy->kind,
+ trail, iterpool));
+ }
+
+ svn_pool_destroy(iterpool);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_fs_base__dag_commit_obliteration_txn(svn_revnum_t replacing_rev,
+ svn_fs_txn_t *txn,
+ trail_t *trail,
+ apr_pool_t *scratch_pool)
+{
+ transaction_t *txn_obj;
+ revision_t revision;
+ const char *old_txn_id;
+
+ /* Find the old txn. */
+ SVN_ERR(svn_fs_base__rev_get_txn_id(&old_txn_id, trail->fs, replacing_rev,
+ trail, scratch_pool));
+
+ /* Read the new txn so we can access its "copies" list */
+ SVN_ERR(svn_fs_bdb__get_txn(&txn_obj, trail->fs, txn->id, trail,
+ scratch_pool));
+
+ /* Finish updating the "copies" table, which was started in
+ * svn_fs_base__begin_obliteration_txn(). Change the keys of all the
+ * "copies" table rows that we created back to their original keys.
+ *
+ * This assumes that the old 'replacing_rev' transaction is now obsolete,
+ * so that the old "copies" table rows are no longer referenced.
+ *
+ * ### TODO: See txn_body_begin_obliteration_txn().
+ * ### TODO: Guarantee the old txn is obsolete.
+ */
+ if (txn_obj->copies)
+ SVN_ERR(copies_update(txn->id, old_txn_id, txn_obj->copies, trail,
+ scratch_pool));
+
+ /* Replace the revision entry in the `revisions' table. */
+ revision.txn_id = txn->id;
+ SVN_ERR(svn_fs_bdb__put_rev(&replacing_rev, txn->fs, &revision, trail,
+ scratch_pool));
+
+ /* Promote the unfinished transaction to a committed one. */
+ SVN_ERR(svn_fs_base__txn_make_committed(txn->fs, txn->id, replacing_rev,
+ trail, scratch_pool));
+
+ /* Update the "node-origins" table. */
+ SVN_ERR(node_origins_update(txn->id, old_txn_id, trail, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
/*** Comparison. ***/
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/dag.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* dag.h : DAG-like interface filesystem, private to libsvn_fs
*
* ====================================================================
- * 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
@@ -282,6 +282,16 @@ svn_error_t *svn_fs_base__dag_commit_txn
apr_pool_t *pool);
+/* Replace the transaction in revision REPLACING_REV with the uncommitted
+ * transaction TXN, and promote TXN to a committed transaction. See also
+ * svn_fs_base__dag_commit_txn(). */
+svn_error_t *
+svn_fs_base__dag_commit_obliteration_txn(svn_revnum_t replacing_rev,
+ svn_fs_txn_t *txn,
+ trail_t *trail,
+ apr_pool_t *scratch_pool);
+
+
/* Directories. */
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* err.c : implementation of fs-private error 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_fs_base/err.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/err.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* err.h : interface to routines for returning Berkeley DB errors
*
* ====================================================================
- * 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_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* fs.c --- creating, opening and closing filesystems
*
* ====================================================================
- * 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_fs_base/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/fs.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* fs.h : interface to Subversion filesystem, private to libsvn_fs
*
* ====================================================================
- * 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
@@ -79,9 +79,6 @@ svn_fs_base__test_required_feature_forma
/* Revision at which the repo started using forward deltas. */
#define SVN_FS_BASE__MISC_FORWARD_DELTA_UPGRADE "forward-delta-rev"
-/* Next filesystem-global unique identifier value (base36). */
-#define SVN_FS_BASE__MISC_NEXT_FSGUID "next-fsguid"
-
/*** The filesystem structure. ***/
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* id.c : operations on node-revision IDs
*
* ====================================================================
- * 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_fs_base/id.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/id.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* id.h : interface to node ID functions, private to libsvn_fs_base
*
* ====================================================================
- * 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_fs_base/key-gen.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* key-gen.c --- manufacturing sequential keys for some db tables
*
* ====================================================================
- * 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_fs_base/key-gen.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/key-gen.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* key-gen.c --- manufacturing sequential keys for some db tables
*
* ====================================================================
- * 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_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* lock.c : functions for manipulating filesystem locks.
*
* ====================================================================
- * 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
@@ -98,9 +98,18 @@ txn_body_lock(void *baton, trail_t *trai
/* While our locking implementation easily supports the locking of
nonexistent paths, we deliberately choose not to allow such madness. */
if (kind == svn_node_none)
- return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
- "Path '%s' doesn't exist in HEAD revision",
- args->path);
+ {
+ if (SVN_IS_VALID_REVNUM(args->current_rev))
+ return svn_error_createf(
+ SVN_ERR_FS_OUT_OF_DATE, NULL,
+ _("Path '%s' doesn't exist in HEAD revision"),
+ args->path);
+ else
+ return svn_error_createf(
+ SVN_ERR_FS_NOT_FOUND, NULL,
+ _("Path '%s' doesn't exist in HEAD revision"),
+ args->path);
+ }
/* There better be a username attached to the fs. */
if (!trail->fs->access_ctx || !trail->fs->access_ctx->username)
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/lock.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* lock.h : internal interface to lock 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_fs_base/node-rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* node-rev.c --- storing and retrieving NODE-REVISION skels
*
* ====================================================================
- * 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_fs_base/node-rev.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/node-rev.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* node-rev.h : interface to node revision retrieval and storage
*
* ====================================================================
- * 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_fs_base/notes/structure
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/notes/structure?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/notes/structure (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/notes/structure Tue Aug 10 17:03:06 2010
@@ -101,7 +101,7 @@ structure summary" section of this docum
-NODE-REVISION and HEADER: how we represent a node revision
+NODE-REVISION: how we represent a node revision
We represent a given revision of a file or directory node using a list
skel (see skel.h for an explanation of skels). A node revision skel
@@ -116,7 +116,7 @@ on what kind of node this is --- file, d
HEADER has the form:
- (KIND CREATED-PATH PRED-ID PRED-COUNT)
+ (KIND CREATED-PATH [PRED-ID [PRED-COUNT [HAS-MERGEINFO MERGEINFO-COUNT]]])
where:
@@ -134,6 +134,9 @@ where:
* PRED-COUNT, if present, indicates the number of predecessors the
node revision has (recursively).
+ * HAS-MERGEINFO and MERGEINFO-COUNT, if present, indicate ...
+ ### TODO
+
Note that a node cannot change its kind from one revision to the next.
A directory node is always a directory; a file node is always a file;
etc. The fact that the node's kind is stored in each node revision,
@@ -164,12 +167,19 @@ FILE: how files are represented.
If a NODE-REVISION's header's KIND is "file", then the node-revision
skel represents a file, and has the form:
- (HEADER PROP-KEY DATA-KEY [EDIT-DATA-KEY])
+ (HEADER PROP-KEY DATA-INFO [EDIT-DATA-KEY])
+
+where
+
+ DATA-INFO ::= DATA-KEY | (DATA-KEY DATA-KEY-UNIQID)
-where DATA-KEY identifies the representation for the file's current
+and DATA-KEY identifies the representation for the file's current
contents, and EDIT-DATA-KEY identifies the representation currently
available for receiving new contents for the file.
+DATA-KEY-UNIQID ...
+### TODO
+
See discussion of representations later.
@@ -257,15 +267,17 @@ and parse it appropriately. A represent
where HEADER is
- (KIND TXN [CHECKSUM])
+ (KIND TXN [MD5 [SHA1]])
The KIND is "fulltext" or "delta". TXN is the txn ID for the txn in
-which this representation was created. CHECKSUM is a checksum of the
+which this representation was created. MD5 is a checksum of the
representation's contents, that is, what the representation produces,
regardless of whether it is stored deltified or as fulltext. (For
-compatibility with older versions of Subversion, CHECKSUM may be
+compatibility with older versions of Subversion, MD5 may be
absent, in which case the filesystem behaves as though the checksum is
-there and is correct.)
+there and is correct.) An additional kind of checksum, SHA1, is present
+in newer formats, starting with version ...
+### TODO
The TXN also serves as a kind of mutability flag: if txn T tries to
change a representation's contents, but the rep's TXN is not T, then
@@ -278,10 +290,10 @@ count as a change, since that wouldn't a
KIND-SPECIFIC varies considerably depending on the kind of
representation. Here are the two forms currently recognized:
- (("fulltext" TXN CHECKSUM) KEY)
- The data is at KEY in the `strings' table.
+ (("fulltext" TXN [MD5 [SHA1]]) STRING-KEY)
+ The data is at STRING-KEY in the `strings' table.
- (("delta" TXN CHECKSUM) (OFFSET WINDOW) ...)
+ (("delta" TXN [MD5 [SHA1]]) (OFFSET WINDOW) ...)
Each OFFSET indicates the point in the fulltext that this
element reconstructs, and WINDOW says how to reconstruct it:
@@ -480,7 +492,7 @@ where:
* ROOT-ID is the node revision ID of the committed transaction's (or
revision's) root node.
- * REVISION represents the revision that was created when the
+ * REV represents the revision that was created when the
transaction was committed.
* PROPLIST is a skel giving the revision properties for the
@@ -573,6 +585,12 @@ following forms:
where:
+ * "copy" indicates an explicitly requested copy, and "soft-copy"
+ indicates a node that was cloned internally as part of an
+ explicitly requested copy of some parent directory. See the
+ section "Copies and Copy IDs" in the file <fs-history> for
+ details.
+
* SRC-PATH and SRC-TXN are the canonicalized absolute path and
transaction ID, respectively, of the source of the copy.
@@ -593,17 +611,17 @@ Locks
When a caller locks a file -- reserving an exclusive right to modify
or delete it -- an lock object is created in a `locks' table.
-The `locks' table is a btree whose key is a UUID string (also known as
-a "lock-token"), and whose value is a skel representing a lock. The
+The `locks' table is a btree whose key is a UUID string known as
+a "lock-token", and whose value is a skel representing a lock. The
fields in the skel mirror those of an svn_lock__t (see svn_types.h):
- ("lock" PATH UUID OWNER COMMENT XML-P CREATION-DATE EXPIRATION-DATE)
+ ("lock" PATH TOKEN OWNER COMMENT XML-P CREATION-DATE EXPIRATION-DATE)
where:
* PATH is the absolute filesystem path reserved by the lock.
- * UUID is the universally unique identifier of the lock, also known
+ * TOKEN is the universally unique identifier of the lock, known
as the lock-token. This is the same as the row's key.
* OWNER is the authenticated username that "owns" the lock.
@@ -915,7 +933,7 @@ Copies:
REAL-COPY ::= ("copy" SRC-PATH SRC-TXN DST-NODE-ID)
SOFT-COPY ::= ("soft-copy" SRC-PATH SRC-TXN DST-NODE-ID)
SRC-PATH ::= atom ;
- SRC-REV ::= TXN ;
+ SRC-TXN ::= TXN ;
DST-NODE-ID ::= NODE-REV-ID ;
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* reps-strings.c : intepreting representations with respect to strings
*
* ====================================================================
- * 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_fs_base/reps-strings.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/reps-strings.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* reps-strings.h : interpreting representations with respect to strings
*
* ====================================================================
- * 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_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* revs-txns.c : operations on revision and transactions
*
* ====================================================================
- * 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
@@ -40,6 +40,7 @@
#include "revs-txns.h"
#include "key-gen.h"
#include "id.h"
+#include "obliterate.h"
#include "bdb/rev-table.h"
#include "bdb/txn-table.h"
#include "bdb/copies-table.h"
@@ -297,7 +298,7 @@ svn_fs_base__change_rev_prop(svn_fs_t *f
args.rev = rev;
args.name = name;
args.value = value;
- return svn_fs_base__retry_txn(fs, txn_body_change_rev_prop, &args,
+ return svn_fs_base__retry_txn(fs, txn_body_change_rev_prop, &args,
TRUE, pool);
}
@@ -433,6 +434,52 @@ svn_fs_base__add_txn_copy(svn_fs_t *fs,
}
+/* Duplicate all entries in the "changes" table that are keyed by OLD_TXN_ID,
+ * creating new entries that are keyed by NEW_TXN_ID.
+ *
+ * Each new "change" has the same content as the old one, except that if the
+ * txn-id component of its noderev-id is OLD_TXN_ID (which is the case for
+ * all changes except deletes) then that is changed to NEW_TXN_ID.
+ *
+ * Work within TRAIL. */
+static svn_error_t *
+changes_dup(const char *new_txn_id,
+ const char *old_txn_id,
+ trail_t *trail,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *changes;
+ int i;
+
+ SVN_ERR(svn_fs_bdb__changes_fetch_raw(&changes, trail->fs, old_txn_id, trail,
+ scratch_pool));
+ for (i = 0; i < changes->nelts; i++)
+ {
+ change_t *change = APR_ARRAY_IDX(changes, i, change_t *);
+
+ if (change->kind != svn_fs_path_change_delete
+ && change->kind != svn_fs_path_change_reset)
+ {
+ const char *node_id, *copy_id;
+
+ /* Modify the "change": change noderev_id's txn_id to NEW_TXN_ID */
+ node_id = svn_fs_base__id_node_id(change->noderev_id);
+ copy_id = svn_fs_base__id_copy_id(change->noderev_id);
+ SVN_ERR_ASSERT(svn_fs_base__key_compare(
+ svn_fs_base__id_txn_id(change->noderev_id), old_txn_id) == 0);
+ change->noderev_id = svn_fs_base__id_create(node_id, copy_id,
+ new_txn_id,
+ scratch_pool);
+ }
+
+ /* Save the new "change" */
+ SVN_ERR(svn_fs_bdb__changes_add(trail->fs, new_txn_id, change, trail,
+ scratch_pool));
+ }
+ return SVN_NO_ERROR;
+}
+
+
/* Generic transaction operations. */
@@ -649,7 +696,7 @@ make_txn(svn_fs_t *fs,
struct begin_txn_args
{
svn_fs_txn_t **txn_p;
- svn_revnum_t rev;
+ svn_revnum_t base_rev;
apr_uint32_t flags;
};
@@ -661,7 +708,7 @@ txn_body_begin_txn(void *baton, trail_t
const svn_fs_id_t *root_id;
const char *txn_id;
- SVN_ERR(svn_fs_base__rev_get_root(&root_id, trail->fs, args->rev,
+ SVN_ERR(svn_fs_base__rev_get_root(&root_id, trail->fs, args->base_rev,
trail, trail->pool));
SVN_ERR(svn_fs_bdb__create_txn(&txn_id, trail->fs, root_id,
trail, trail->pool));
@@ -688,31 +735,130 @@ txn_body_begin_txn(void *baton, trail_t
SVN_ERR(txn_body_change_txn_prop(&cpargs, trail));
}
- *args->txn_p = make_txn(trail->fs, txn_id, args->rev, trail->pool);
+ *args->txn_p = make_txn(trail->fs, txn_id, args->base_rev, trail->pool);
return SVN_NO_ERROR;
}
+/* Create a new transaction that is a mutable duplicate of the committed
+ * transaction in a particular revision, and able to become a replacement
+ * for the transaction in that revision. The duplicate transaction has a new
+ * txn-id and is a deep copy of the old one. All references to the txn-id
+ * within the copied parts of it are updated.
+ *
+ * The resulting transaction should be committed by
+ * svn_fs_base__commit_obliteration_txn(), not by a normal commit.
+ *
+ * BATON is of type (struct begin_txn_args *).
+ * BATON->base_rev is the revision on which the existing revision
+ * is based, i.e. one less than the number of the revision to be replaced.
+ * BATON->flags must be 0: specifically, the CHECK_OOD and CHECK_LOCKS
+ * flags are not supported.
+ *
+ * Set BATON->txn_p to point to the new transaction object, allocated in
+ * TRAIL->pool.
+ */
static svn_error_t *
txn_body_begin_obliteration_txn(void *baton, trail_t *trail)
{
struct begin_txn_args *args = baton;
- const svn_fs_id_t *root_id;
- const char *txn_id;
-
- SVN_ERR(svn_fs_base__rev_get_root(&root_id, trail->fs, args->rev,
- trail, trail->pool));
- SVN_ERR(svn_fs_bdb__create_txn(&txn_id, trail->fs, root_id,
+ int replacing_rev = args->base_rev + 1;
+ const svn_fs_id_t *base_root_id;
+ const char *old_txn_id, *new_txn_id;
+ transaction_t *old_txn, *new_txn;
+
+ /* Obliteration doesn't support these flags */
+ SVN_ERR_ASSERT(! (args->flags & SVN_FS_TXN_CHECK_OOD));
+ SVN_ERR_ASSERT(! (args->flags & SVN_FS_TXN_CHECK_LOCKS));
+
+ /*
+ * This is like a combination of "dup the txn" and "make the txn mutable".
+ * "Dup the txn" means making a deep copy, but with a new txn id.
+ * "Make mutable" is like the opposite of finalizing a txn.
+ *
+ * To dup the txn in r50:
+ * * dup TRANSACTIONS<t50> to TRANSACTIONS<t50'>
+ * * dup all referenced NODES<*.*.t50> (not old nodes that are referenced)
+ * * dup all referenced REPRESENTATIONS<*> to REPRESENTATIONS<*'>
+ * * create new STRINGS<*> where necessary (###?)
+ * * dup all CHANGES<t50> to CHANGES<t50'>
+ * * update COPIES<cpy_id> (We need to keep the copy IDs the same, but will
+ * need to modify the copy src_txn fields.)
+ * * update NODE-ORIGINS<node_id>
+ *
+ * At commit time:
+ * * update CHECKSUM-REPS<csum>
+ */
+
+ /* Implementation:
+ * - create a new txn (to get a new txn-id)
+ * - read the new txn
+ * - modify the new txn locally, duplicating parts of the old txn
+ * - write the modified new txn
+ * - return a reference to the new txn
+ */
+
+ /* Create a new txn whose 'root' and 'base root' node-rev ids both point
+ * to the previous revision, like txn_body_begin_txn() does. */
+ SVN_ERR(svn_fs_base__rev_get_root(&base_root_id, trail->fs,
+ args->base_rev, trail, trail->pool));
+ SVN_ERR(svn_fs_bdb__create_txn(&new_txn_id, trail->fs, base_root_id,
trail, trail->pool));
- /* ### No need for "CHECK_OOD" and "CHECK_LOCKS" like the non-oblit case? */
+ /* Read the old and new txns */
+ SVN_ERR(svn_fs_base__rev_get_txn_id(&old_txn_id, trail->fs, replacing_rev,
+ trail, trail->pool));
+ SVN_ERR(svn_fs_bdb__get_txn(&old_txn, trail->fs, old_txn_id, trail,
+ trail->pool));
+ SVN_ERR(svn_fs_bdb__get_txn(&new_txn, trail->fs, new_txn_id, trail,
+ trail->pool));
+
+ /* Populate NEW_TXN with a duplicate of the contents of OLD_TXN. */
+
+ SVN_ERR_ASSERT(new_txn->kind == transaction_kind_normal);
+
+ /* Dup the old txn's root node-rev (recursively). */
+ SVN_ERR(svn_fs_base__node_rev_dup(&new_txn->root_id, old_txn->root_id,
+ new_txn_id, old_txn_id, trail,
+ trail->pool));
+
+ /* Dup txn->proplist */
+ new_txn->proplist = old_txn->proplist;
+
+ /* Prepare to update the "copies" table.
+ *
+ * As part of obliteration, we need to update all of the "copies" table
+ * rows that are referenced by this txn, to refer to the new txn's
+ * node-rev ids instead. At txn begin time, just keep the references to
+ * the old rows. At commit time, we will update those rows to refer to
+ * this txn's node-rev ids.
+ *
+ * We cannot simply create new "copies" table rows now and make the old
+ * ones obsolete at commit time, because the rows are keyed by copy-id,
+ * and we don't want to change the copy_ids because they pervade node-ids
+ * throughout history.
+ *
+ * ### What actually uses the "copies" table? Does anything use it during
+ * txn construction? Does it need to be keyed by copy-id or could we
+ * change the schema to use arbitrary keys? */
+ if (old_txn->copies)
+ {
+ new_txn->copies = apr_array_copy(trail->pool, old_txn->copies);
+ }
+
+ /* Dup the "changes" that are keyed by the txn_id. */
+ SVN_ERR(changes_dup(new_txn_id, old_txn_id, trail, trail->pool));
- *args->txn_p = make_txn(trail->fs, txn_id, args->rev, trail->pool);
+ /* Save the modified transaction */
+ SVN_ERR(svn_fs_bdb__put_txn(trail->fs, new_txn, new_txn_id, trail,
+ trail->pool));
+
+ /* Make and return an in-memory txn object referring to the new txn */
+ *args->txn_p = make_txn(trail->fs, new_txn_id, args->base_rev,
+ trail->pool);
return SVN_NO_ERROR;
}
-
-
/* Note: it is acceptable for this function to call back into
public FS API interfaces because it does not itself use trails. */
svn_error_t *
@@ -729,7 +875,7 @@ svn_fs_base__begin_txn(svn_fs_txn_t **tx
SVN_ERR(svn_fs__check_fs(fs, TRUE));
args.txn_p = &txn;
- args.rev = rev;
+ args.base_rev = rev;
args.flags = flags;
SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_begin_txn, &args, FALSE, pool));
@@ -747,10 +893,17 @@ svn_fs_base__begin_txn(svn_fs_txn_t **tx
}
+/* Create a new transaction in FS that is a mutable clone of the transaction
+ * in revision REPLACING_REV and is intended to replace it. Set *TXN_P to
+ * point to the new transaction.
+ *
+ * This is like svn_fs_base__begin_txn() except that it populates the new txn
+ * with a mutable clone of revision REPLACING_REV, and it does not support the
+ * CHECK_OOD and CHECK_LOCKS flags, and it does not change the date stamp. */
svn_error_t *
svn_fs_base__begin_obliteration_txn(svn_fs_txn_t **txn_p,
svn_fs_t *fs,
- svn_revnum_t rev,
+ svn_revnum_t replacing_rev,
apr_pool_t *pool)
{
svn_fs_txn_t *txn;
@@ -758,15 +911,17 @@ svn_fs_base__begin_obliteration_txn(svn_
SVN_ERR(svn_fs__check_fs(fs, TRUE));
+ /* Make a mutable duplicate of replacing_rev's txn. */
+ /* ### Does all of the duplication need to be done inside the retry_txn?
+ * It is currently inside. */
args.txn_p = &txn;
- args.rev = rev;
+ args.base_rev = replacing_rev - 1;
args.flags = 0;
SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_begin_obliteration_txn, &args,
FALSE, pool));
*txn_p = txn;
- return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL);
return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/revs-txns.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* revs-txns.h : internal interface to revision and transactions operations
*
* ====================================================================
- * 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
@@ -91,7 +91,7 @@ svn_error_t *svn_fs_base__txn_get_revisi
apr_pool_t *pool);
-/* Retrieve information about the Subversion transaction SVN_TXN from
+/* Retrieve information about the Subversion transaction TXN_NAME from
the `transactions' table of FS, as part of TRAIL.
Set *ROOT_ID_P to the ID of the transaction's root directory.
Set *BASE_ROOT_ID_P to the ID of the root directory of the
@@ -188,10 +188,11 @@ svn_error_t *svn_fs_base__begin_txn(svn_
apr_pool_t *pool);
/* Begin a new transaction in filesystem FS, to replace an existing
- revision REV. The new transaction is returned in *TXN_P. Allocate
- the new transaction structure from POOL. */
+ revision REPLACING_REV. The new transaction is returned in *TXN_P.
+ Allocate the new transaction structure from POOL. */
svn_error_t *svn_fs_base__begin_obliteration_txn(svn_fs_txn_t **txn_p,
- svn_fs_t *fs, svn_revnum_t rev,
+ svn_fs_t *fs,
+ svn_revnum_t replacing_rev,
apr_pool_t *pool);
svn_error_t *svn_fs_base__open_txn(svn_fs_txn_t **txn, svn_fs_t *fs,
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* trail.c : backing out of aborted Berkeley DB transactions
*
* ====================================================================
- * 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_fs_base/trail.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/trail.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* trail.h : internal interface to backing out of aborted Berkeley DB txns
*
* ====================================================================
- * 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
@@ -119,7 +119,29 @@ extern "C" {
SVN_NO_ERROR, `svn_fs_base__retry_txn' commits the trail's Berkeley DB
transaction, thus making your DB changes permanent, leaves the
trail's pool alone so all the objects it contains are still
- around (unless you request otherwise), and returns SVN_NO_ERROR. */
+ around (unless you request otherwise), and returns SVN_NO_ERROR.
+
+
+ Keep the amount of work done in a trail small. C-Mike Pilato said to me:
+
+ I want to draw your attention to something that you may or may not realize
+ about designing for the BDB backend. The 'trail' objects are (generally)
+ representative of Berkeley DB transactions -- that part I'm sure you know.
+ But you might not realize the value of keeping transactions as small as
+ possible. Berkeley DB will accumulate locks (which I believe are
+ page-level, not as tight as row-level like you might hope) over the course
+ of a transaction, releasing those locks only at transaction commit/abort.
+ Berkeley DB backends are configured to have a maximum number of locks and
+ lockers allowed, and it's easier than you might think to hit the max-locks
+ thresholds (especially under high concurrency) and see an error (typically a
+ "Cannot allocate memory") result from that.
+
+ For example, in [a loop] you are writing a bunch of rows to the
+ `changes' table. Could be 10. Could be 100,000. 100,000 writes and
+ associated locks might be a problem or it might not. But I use it as a way
+ to encourage you to think about reducing the amount of work you spend in any
+ one trail [...].
+*/
struct trail_t
{
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* tree.c : tree-like filesystem, built on DAG filesystem
*
* ====================================================================
- * 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
@@ -1474,7 +1474,7 @@ svn_fs_base__miscellaneous_get(const cha
mga.key = key;
mga.val = val;
- SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_miscellaneous_get, &mga,
+ SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_miscellaneous_get, &mga,
FALSE, scratch_pool));
if (*val)
*val = apr_pstrdup(pool, *val);
@@ -2773,15 +2773,41 @@ svn_fs_base__commit_txn(const char **con
}
+/* Commit BATON->txn as a replacement for the existing transaction in
+ * revision BATON->new_rev. BATON is of type (struct commit_args *).
+ *
+ * If the commit succeeds, ARGS->txn is destroyed.
+ */
+static svn_error_t *
+txn_body_commit_obliteration(void *baton, trail_t *trail)
+{
+ struct commit_args *args = baton;
+
+ return svn_fs_base__dag_commit_obliteration_txn(args->new_rev, args->txn,
+ trail, trail->pool);
+}
+
+
+/* ### Under development */
svn_error_t *
-svn_fs_base__commit_obliteration_txn(svn_revnum_t rev,
+svn_fs_base__commit_obliteration_txn(svn_revnum_t replacing_rev,
svn_fs_txn_t *txn,
apr_pool_t *pool)
{
- /* svn_fs_t *fs = txn->fs; */
+ struct commit_args commit_args;
+
+ /* We do not need a re-try loop like the (catch up to head, try to
+ * commit) loop that svn_fs_base__commit_txn() uses, because the only
+ * concurrent changes that can affect this old revision are other
+ * obliterates, and they are presently ...
+ * ### what - not handled, not supported, mutually exclusive? */
+ commit_args.new_rev = replacing_rev;
+ commit_args.txn = txn;
+ SVN_ERR(svn_fs_base__retry_txn(txn->fs, txn_body_commit_obliteration,
+ &commit_args, FALSE, pool));
- return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL);
- /* return SVN_NO_ERROR; */
+ /* return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL); */
+ return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/tree.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* tree.h : internal interface to tree node 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
@@ -44,7 +44,7 @@ svn_error_t *svn_fs_base__commit_txn(con
svn_revnum_t *new_rev, svn_fs_txn_t *txn,
apr_pool_t *pool);
-svn_error_t *svn_fs_base__commit_obliteration_txn(svn_revnum_t rev,
+svn_error_t *svn_fs_base__commit_obliteration_txn(svn_revnum_t replacing_rev,
svn_fs_txn_t *txn,
apr_pool_t *pool);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* fs_skels.c --- conversion between fs native types and skeletons
*
* ====================================================================
- * 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_fs_base/util/fs_skels.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/util/fs_skels.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* skeletons
*
* ====================================================================
- * 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_fs_base/uuid.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* uuid.c : operations on repository uuids
*
* ====================================================================
- * 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
@@ -71,7 +71,7 @@ svn_fs_base__get_uuid(svn_fs_t *fs,
args.uuid = uuid;
SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_get_uuid, &args,
FALSE, scratch_pool));
-
+
if (*uuid)
{
*uuid = apr_pstrdup(pool, *uuid);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_base/uuid.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* uuid.h : internal interface to uuid 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
Propchange: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 10 17:03:06 2010
@@ -8,3 +8,4 @@ Release
*~
.*~
rep-cache-db.h
+revprops-db.h
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/caching.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* caching.c : in-memory caching
*
* ====================================================================
- * 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
@@ -88,7 +88,7 @@ dup_dir_listing(void **out,
apr_pool_t *pool)
{
apr_hash_t *new_entries = apr_hash_make(pool);
- const apr_hash_t *entries = in;
+ apr_hash_t *entries = (void*)in; /* Cast away const only */
apr_hash_index_t *hi;
for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.c Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* dag.c : DAG-like interface filesystem, private to libsvn_fs
*
* ====================================================================
- * 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_fs_fs/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/dag.h Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
/* dag.h : DAG-like interface filesystem, private to libsvn_fs
*
* ====================================================================
- * 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_fs_fs/err.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.c?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.c Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* err.c : implementation of fs-private error 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_fs_fs/err.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.h?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_fs_fs/err.h Tue Aug 10 17:03:06 2010
@@ -2,10 +2,10 @@
* err.h : interface to routines for returning Berkeley DB errors
*
* ====================================================================
- * 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