You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/01/06 03:33:39 UTC
svn commit: r1429457 [10/21] - in /subversion/branches/tree-read-api: ./
build/ build/ac-macros/ build/generator/templates/ build/win32/
contrib/server-side/svncutter/ doc/ subversion/bindings/cxxhl/include/
subversion/bindings/cxxhl/include/svncxxhl/ ...
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/wc-queries.sql?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/wc-queries.sql Sun Jan 6 02:33:34 2013
@@ -98,7 +98,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2
-- STMT_SELECT_LOWEST_WORKING_NODE
SELECT op_depth, presence
FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3
ORDER BY op_depth
LIMIT 1
@@ -157,7 +157,7 @@ VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8,
SELECT local_relpath, kind FROM nodes n
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND op_depth = 0
- AND presence in ('normal', 'incomplete')
+ AND presence in (MAP_NORMAL, MAP_INCOMPLETE)
AND NOT EXISTS(SELECT 1 FROM NODES w
WHERE w.wc_id = ?1 AND w.local_relpath = n.local_relpath
AND op_depth > 0)
@@ -168,7 +168,7 @@ SELECT local_relpath, kind, checksum, tr
FROM nodes n
WHERE wc_id = ?1
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND presence in ('normal', 'incomplete')
+ AND presence in (MAP_NORMAL, MAP_INCOMPLETE)
AND op_depth = (SELECT MAX(op_depth)
FROM NODES w
WHERE w.wc_id = ?1
@@ -198,12 +198,12 @@ WHERE wc_id = ?1 AND IS_STRICT_DESCENDAN
WHERE w.wc_id = ?1
AND w.local_relpath = actual_node.local_relpath
AND op_depth > 0
- AND presence in ('normal', 'incomplete', 'not-present'))
+ AND presence in (MAP_NORMAL, MAP_INCOMPLETE, MAP_NOT_PRESENT))
-- STMT_DELETE_WORKING_BASE_DELETE
DELETE FROM nodes
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND presence = 'base-deleted'
+ AND presence = MAP_BASE_DELETED
AND op_depth > 0
AND op_depth = (SELECT MIN(op_depth) FROM nodes n
WHERE n.wc_id = ?1
@@ -220,15 +220,43 @@ DELETE FROM nodes
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND op_depth = 0
+-- STMT_DELETE_WORKING_OP_DEPTH
+DELETE FROM nodes
+WHERE wc_id = ?1
+ AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND op_depth = ?3
+
+-- STMT_SELECT_LOCAL_RELPATH_OP_DEPTH
+SELECT local_relpath
+FROM nodes
+WHERE wc_id = ?1
+ AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND op_depth = ?3
+
+-- STMT_COPY_NODE_MOVE
+INSERT OR REPLACE INTO nodes (
+ wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
+ revision, presence, depth, kind, changed_revision, changed_date,
+ changed_author, checksum, properties, translated_size, last_mod_time,
+ symlink_target, moved_here )
+SELECT
+ wc_id, ?4 /*local_relpath */, ?5 /*op_depth*/, ?6 /* parent_relpath */,
+ repos_id,
+ repos_path, revision, presence, depth, kind, changed_revision,
+ changed_date, changed_author, checksum, properties, translated_size,
+ last_mod_time, symlink_target, 1
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
+
-- STMT_SELECT_OP_DEPTH_CHILDREN
-SELECT local_relpath FROM nodes
+SELECT local_relpath, kind FROM nodes
WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = ?3
AND (?3 != 0 OR file_external is NULL)
-- STMT_SELECT_GE_OP_DEPTH_CHILDREN
SELECT 1 FROM nodes
WHERE wc_id = ?1 AND parent_relpath = ?2
- AND (op_depth > ?3 OR (op_depth = ?3 AND presence != 'base-deleted'))
+ AND (op_depth > ?3 OR (op_depth = ?3 AND presence != MAP_BASE_DELETED))
UNION ALL
SELECT 1 FROM ACTUAL_NODE
WHERE wc_id = ?1 AND parent_relpath = ?2
@@ -239,21 +267,21 @@ DELETE FROM nodes
WHERE wc_id = ?1
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND (op_depth < ?3
- OR (op_depth = ?3 AND presence = 'base-deleted'))
+ OR (op_depth = ?3 AND presence = MAP_BASE_DELETED))
/* Get not-present descendants of a copied node. Not valid for the wc-root */
-- STMT_SELECT_NOT_PRESENT_DESCENDANTS
SELECT local_relpath FROM nodes
WHERE wc_id = ?1 AND op_depth = ?3
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND presence = 'not-present'
+ AND presence = MAP_NOT_PRESENT
-- STMT_COMMIT_DESCENDANT_TO_BASE
UPDATE NODES SET op_depth = 0, repos_id = ?4, repos_path = ?5, revision = ?6,
moved_here = NULL, moved_to = NULL, dav_cache = NULL,
- presence = CASE presence WHEN 'normal' THEN 'normal'
- WHEN 'excluded' THEN 'excluded'
- ELSE 'not-present' END
+ presence = CASE presence WHEN MAP_NORMAL THEN MAP_NORMAL
+ WHEN MAP_EXCLUDED THEN MAP_EXCLUDED
+ ELSE MAP_NOT_PRESENT END
WHERE wc_id = ?1 AND local_relpath = ?2 and op_depth = ?3
-- STMT_SELECT_NODE_CHILDREN
@@ -274,11 +302,7 @@ WHERE wc_id = ?1 AND parent_relpath = ?2
OR
(op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2)
- AND presence != 'base-deleted'))
-
--- STMT_SELECT_BASE_PROPS
-SELECT properties FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+ AND presence != MAP_BASE_DELETED))
-- STMT_SELECT_NODE_PROPS
SELECT properties, presence FROM nodes
@@ -289,17 +313,6 @@ ORDER BY op_depth DESC
SELECT properties FROM actual_node
WHERE wc_id = ?1 AND local_relpath = ?2
--- STMT_UPDATE_NODE_BASE_PROPS
-UPDATE nodes SET properties = ?3
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
-
--- STMT_UPDATE_NODE_WORKING_PROPS
-UPDATE nodes SET properties = ?3
-WHERE wc_id = ?1 AND local_relpath = ?2
- AND op_depth =
- (SELECT MAX(op_depth) FROM nodes
- WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0)
-
-- STMT_UPDATE_ACTUAL_PROPS
UPDATE actual_node SET properties = ?3
WHERE wc_id = ?1 AND local_relpath = ?2
@@ -344,7 +357,7 @@ WHERE work.wc_id = ?1 AND work.local_rel
LIMIT 1
-- STMT_SELECT_DELETION_INFO_SCAN
-/* ### FIXME. modes_move.moved_to IS NOT NULL works when there is
+/* ### FIXME. moved.moved_to IS NOT NULL works when there is
only one move but we need something else when there are several. */
SELECT (SELECT b.presence FROM nodes AS b
WHERE b.wc_id = ?1 AND b.local_relpath = ?2 AND b.op_depth = 0),
@@ -408,10 +421,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2
AND op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2)
--- STMT_UPDATE_NODE_FILEINFO_OPDEPTH
-UPDATE nodes SET translated_size = ?3, last_mod_time = ?4
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?5
-
-- STMT_INSERT_ACTUAL_CONFLICT
INSERT INTO actual_node (wc_id, local_relpath, conflict_data, parent_relpath)
VALUES (?1, ?2, ?3, ?4)
@@ -427,7 +436,7 @@ WHERE wc_id = ?1
AND local_relpath = (SELECT local_relpath FROM targets_list AS t
WHERE wc_id = ?1
AND t.local_relpath = actual_node.local_relpath
- AND kind = 'file')
+ AND kind = MAP_FILE)
-- STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST
UPDATE actual_node SET changelist = NULL
@@ -440,7 +449,7 @@ SELECT wc_id, local_relpath, 7, ?3
FROM targets_list
WHERE wc_id = ?1
AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND kind = 'dir'
+ AND kind = MAP_DIR
-- STMT_RESET_ACTUAL_WITH_CHANGELIST
REPLACE INTO actual_node (
@@ -479,10 +488,6 @@ BEGIN
WHERE new.changelist IS NOT NULL;
END
--- STMT_INSERT_CHANGELIST_LIST
-INSERT INTO changelist_list(wc_id, local_relpath, notify, changelist)
-VALUES (?1, ?2, ?3, ?4)
-
-- STMT_FINALIZE_CHANGELIST
DROP TRIGGER trigger_changelist_list_change;
DROP TABLE changelist_list;
@@ -520,7 +525,7 @@ SELECT wc_id, local_relpath, parent_relp
FROM nodes_current
WHERE wc_id = ?1
AND parent_relpath = ?2
- AND kind = 'file'
+ AND kind = MAP_FILE
-- STMT_INSERT_TARGET_DEPTH_IMMEDIATES
INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind)
@@ -552,7 +557,7 @@ SELECT N.wc_id, N.local_relpath, N.paren
ON A.wc_id = N.wc_id AND A.local_relpath = N.local_relpath
WHERE N.wc_id = ?1
AND N.parent_relpath = ?2
- AND kind = 'file'
+ AND kind = MAP_FILE
AND A.changelist = ?3
-- STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_IMMEDIATES
@@ -620,8 +625,8 @@ WHERE wc_id = ?1 AND local_relpath = ?2
DELETE FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2
AND op_depth = (SELECT MIN(op_depth) FROM nodes
- WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0)
- AND presence = 'base-deleted'
+ WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3)
+ AND presence = MAP_BASE_DELETED
-- STMT_DELETE_ALL_LAYERS
DELETE FROM nodes
@@ -652,7 +657,7 @@ WHERE wc_id = ?1
AND (changelist IS NULL
OR NOT EXISTS (SELECT 1 FROM nodes_current c
WHERE c.wc_id = ?1 AND c.local_relpath = ?2
- AND c.kind = 'file'))
+ AND c.kind = MAP_FILE))
-- STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE
DELETE FROM actual_node
@@ -663,7 +668,7 @@ WHERE wc_id = ?1
OR NOT EXISTS (SELECT 1 FROM nodes_current c
WHERE c.wc_id = ?1
AND c.local_relpath = actual_node.local_relpath
- AND c.kind = 'file'))
+ AND c.kind = MAP_FILE))
-- STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST
UPDATE actual_node
@@ -692,7 +697,7 @@ WHERE wc_id = ?1
-- STMT_UPDATE_NODE_BASE_DEPTH
UPDATE nodes SET depth = ?3
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
- AND kind='dir'
+ AND kind=MAP_DIR
-- STMT_UPDATE_NODE_BASE_PRESENCE
UPDATE nodes SET presence = ?3
@@ -746,6 +751,9 @@ WHERE refcount = 0
DELETE FROM pristine
WHERE checksum = ?1 AND refcount = 0
+-- STMT_VACUUM
+VACUUM
+
-- STMT_SELECT_CONFLICT_VICTIMS
SELECT local_relpath, conflict_data
FROM actual_node
@@ -811,23 +819,20 @@ VALUES (?1, ?2, 0,
INSERT OR REPLACE INTO nodes (
wc_id, local_relpath, op_depth,
parent_relpath, presence, kind)
-SELECT wc_id, local_relpath, ?3 /*op_depth*/,
- parent_relpath, ?4 /*presence*/, kind
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+VALUES(?1, ?2, ?3, ?4, MAP_BASE_DELETED, ?5)
/* If this query is updated, STMT_INSERT_DELETE_LIST should too. */
-- STMT_INSERT_DELETE_FROM_NODE_RECURSIVE
INSERT INTO nodes (
wc_id, local_relpath, op_depth, parent_relpath, presence, kind)
-SELECT wc_id, local_relpath, ?4 /*op_depth*/, parent_relpath, 'base-deleted',
+SELECT wc_id, local_relpath, ?4 /*op_depth*/, parent_relpath, MAP_BASE_DELETED,
kind
FROM nodes
WHERE wc_id = ?1
AND (local_relpath = ?2
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth = ?3
- AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'server-excluded')
+ AND presence NOT IN (MAP_BASE_DELETED, MAP_NOT_PRESENT, MAP_EXCLUDED, MAP_SERVER_EXCLUDED)
-- STMT_INSERT_WORKING_NODE_FROM_BASE_COPY
INSERT INTO nodes (
@@ -846,7 +851,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2
INSERT INTO nodes (
wc_id, local_relpath, op_depth, parent_relpath, presence, kind)
SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath,
- 'base-deleted', kind
+ MAP_BASE_DELETED, kind
FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
@@ -865,7 +870,7 @@ LIMIT 1
SELECT local_relpath FROM nodes
WHERE wc_id = ?1
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND op_depth = 0 AND presence = 'server-excluded'
+ AND op_depth = 0 AND presence = MAP_SERVER_EXCLUDED
LIMIT 1
/* Select all excluded nodes. Not valid on the WC-root */
@@ -874,7 +879,7 @@ SELECT local_relpath FROM nodes
WHERE wc_id = ?1
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND op_depth = 0
- AND (presence = 'server-excluded' OR presence = 'excluded')
+ AND (presence = MAP_SERVER_EXCLUDED OR presence = MAP_EXCLUDED)
/* Creates a copy from one top level NODE to a different location */
-- STMT_INSERT_WORKING_NODE_COPY_FROM
@@ -949,7 +954,7 @@ WHERE wc_id = ?1
DELETE FROM externals
WHERE wc_id = ?1
AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND kind != 'dir'
+ AND kind != MAP_DIR
-- STMT_DELETE_EXTERNAL_REGISTATIONS
DELETE FROM externals
@@ -1012,7 +1017,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2
* WHERE wc_id = ?1
* AND (local_relpath = ?2
* OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- * AND kind = 'dir' AND presence IN ('normal', 'incomplete')
+ * AND kind = MAP_DIR AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)
* ### But it would take a double table scan execution plan for it.
* ### Maybe there is something else going on? */
SELECT IFNULL((SELECT properties FROM actual_node a
@@ -1021,7 +1026,7 @@ SELECT IFNULL((SELECT properties FROM ac
local_relpath, depth
FROM nodes_current n
WHERE wc_id = ?1 AND local_relpath = ?2
- AND kind = 'dir' AND presence IN ('normal', 'incomplete')
+ AND kind = MAP_DIR AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)
UNION ALL
SELECT IFNULL((SELECT properties FROM actual_node a
WHERE a.wc_id = ?1 AND A.local_relpath = n.local_relpath),
@@ -1029,7 +1034,7 @@ SELECT IFNULL((SELECT properties FROM ac
local_relpath, depth
FROM nodes_current n
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
- AND kind = 'dir' AND presence IN ('normal', 'incomplete')
+ AND kind = MAP_DIR AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)
-- STMT_SELECT_CURRENT_PROPS_RECURSIVE
/* ### Ugly OR to make sqlite use the proper optimizations */
@@ -1067,16 +1072,12 @@ VALUES (?1, ?2, ?3, ?4)
-- STMT_SELECT_ALL_FILES
SELECT local_relpath FROM nodes_current
-WHERE wc_id = ?1 AND parent_relpath = ?2 AND kind = 'file'
+WHERE wc_id = ?1 AND parent_relpath = ?2 AND kind = MAP_FILE
-- STMT_UPDATE_NODE_PROPS
UPDATE nodes SET properties = ?4
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
--- STMT_HAS_WORKING_NODES
-SELECT 1 FROM nodes WHERE op_depth > 0
-LIMIT 1
-
/* --------------------------------------------------------------------------
* Complex queries for callback walks, caching results in a temporary table.
*
@@ -1105,13 +1106,13 @@ INSERT INTO target_prop_cache(local_relp
JOIN nodes_current AS n ON t.wc_id= n.wc_id
AND t.local_relpath = n.local_relpath
WHERE t.wc_id = ?1
- AND (presence='normal' OR presence='incomplete')
+ AND (presence=MAP_NORMAL OR presence=MAP_INCOMPLETE)
-- STMT_CACHE_TARGET_PRISTINE_PROPS
INSERT INTO target_prop_cache(local_relpath, kind, properties)
SELECT n.local_relpath, n.kind,
CASE n.presence
- WHEN 'base-deleted'
+ WHEN MAP_BASE_DELETED
THEN (SELECT properties FROM nodes AS p
WHERE p.wc_id = n.wc_id
AND p.local_relpath = n.local_relpath
@@ -1122,9 +1123,9 @@ INSERT INTO target_prop_cache(local_relp
JOIN nodes_current AS n ON t.wc_id= n.wc_id
AND t.local_relpath = n.local_relpath
WHERE t.wc_id = ?1
- AND (presence = 'normal'
- OR presence = 'incomplete'
- OR presence = 'base-deleted')
+ AND (presence = MAP_NORMAL
+ OR presence = MAP_INCOMPLETE
+ OR presence = MAP_BASE_DELETED)
-- STMT_SELECT_ALL_TARGET_PROP_CACHE
SELECT local_relpath, properties FROM target_prop_cache
@@ -1247,7 +1248,7 @@ WHERE wc_id = ?1
AND op_depth = (SELECT MAX(s.op_depth) FROM nodes AS s
WHERE s.wc_id = ?1
AND s.local_relpath = n.local_relpath)
- AND presence NOT IN ('base-deleted', 'not-present', 'excluded', 'server-excluded')
+ AND presence NOT IN (MAP_BASE_DELETED, MAP_NOT_PRESENT, MAP_EXCLUDED, MAP_SERVER_EXCLUDED)
-- STMT_SELECT_DELETE_LIST
SELECT local_relpath FROM delete_list
@@ -1267,7 +1268,7 @@ SELECT MIN(revision), MAX(revision),
WHERE wc_id = ?1
AND (local_relpath = ?2
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND presence IN ('normal', 'incomplete')
+ AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)
AND file_external IS NULL
AND op_depth = 0
@@ -1277,8 +1278,8 @@ WHERE wc_id = ?1
AND (local_relpath = ?2
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth = 0
- AND (presence IN ('server-excluded', 'excluded')
- OR depth NOT IN ('infinity', 'unknown'))
+ AND (presence IN (MAP_SERVER_EXCLUDED, MAP_EXCLUDED)
+ OR depth NOT IN (MAP_DEPTH_INFINITY, MAP_DEPTH_UNKNOWN))
AND file_external IS NULL
LIMIT 1
@@ -1373,8 +1374,8 @@ WHERE wc_id = ?1
AND (local_relpath = ?2
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth = 0
- AND kind='file'
- AND presence='normal'
+ AND kind=MAP_FILE
+ AND presence=MAP_NORMAL
AND file_external IS NULL
/* ### FIXME: op-depth? What about multiple moves? */
@@ -1386,10 +1387,9 @@ WHERE wc_id = ?1 AND moved_to = ?2 AND o
UPDATE nodes SET moved_to = ?4
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
-/* ### FIXME: op-depth? What about multiple moves? */
-- STMT_CLEAR_MOVED_TO_RELPATH
UPDATE nodes SET moved_to = NULL
-WHERE wc_id = ?1 AND local_relpath = ?2
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
/* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1.
* Each row returns a moved-here path (always a child of ?2) in the first
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/wc.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/wc.h Sun Jan 6 02:33:34 2013
@@ -188,6 +188,16 @@ extern "C" {
/* A version < this has no work queue (see workqueue.h). */
#define SVN_WC__HAS_WORK_QUEUE 13
+/* Return a string indicating the released version (or versions) of
+ * Subversion that used WC format number WC_FORMAT, or some other
+ * suitable string if no released version used WC_FORMAT.
+ *
+ * ### It's not ideal to encode this sort of knowledge in this low-level
+ * library. On the other hand, it doesn't need to be updated often and
+ * should be easily found when it does need to be updated. */
+const char *
+svn_wc__version_string_from_format(int wc_format);
+
/* Return true iff error E indicates an "is not a working copy" type
of error, either because something wasn't a working copy at all, or
because it's a working copy from a previous version (in need of
@@ -378,17 +388,24 @@ svn_wc__internal_file_modified_p(svn_boo
apr_pool_t *scratch_pool);
-/* Merge the difference between LEFT_ABSPATH and RIGHT_ABSPATH into
- TARGET_ABSPATH, return the appropriate work queue operations in
- *WORK_ITEMS.
-
- Note that, in the case of updating, the update can have sent new
- properties, which could affect the way the wc target is
- detranslated and compared with LEFT and RIGHT for merging.
-
- The merge result is stored in *MERGE_OUTCOME and merge conflicts
- are marked in MERGE_RESULT using LEFT_LABEL, RIGHT_LABEL and
- TARGET_LABEL.
+/* Prepare to merge a file content change into the working copy. This
+ does not merge properties; see svn_wc__merge_props() for that. This
+ ### [does | does not]
+ change the working file on disk as well as returning work items.
+
+ Merge the difference between LEFT_ABSPATH and RIGHT_ABSPATH into
+ TARGET_ABSPATH.
+
+ Set *WORK_ITEMS to the appropriate work queue operations.
+
+ If there are any conflicts, append a conflict description to
+ *CONFLICT_SKEL. (First allocate *CONFLICT_SKEL from RESULT_POOL if
+ it is initially NULL. CONFLICT_SKEL itself must not be NULL.)
+ Also, unless it is considered to be a 'binary' file, mark any
+ conflicts in the text of the file TARGET_ABSPATH using LEFT_LABEL,
+ RIGHT_LABEL and TARGET_LABEL.
+
+ Set *MERGE_OUTCOME to indicate the result.
When DRY_RUN is true, no actual changes are made to the working copy.
@@ -402,11 +419,17 @@ svn_wc__internal_file_modified_p(svn_boo
retrieved. (Interesting for merging file externals).
ACTUAL_PROPS is the set of actual properties before merging; used for
- detranslating the file before merging.
+ detranslating the file before merging. This is necessary because, in
+ the case of updating, the update can have sent new properties, so we
+ cannot simply fetch and use the current actual properties.
+
+ ### Is ACTUAL_PROPS still necessary, now that we first prepare the
+ content change and property change and then apply them both to
+ the WC together?
Property changes sent by the update are provided in PROP_DIFF.
- For a complete description, see svn_wc_merge3() for which this is
+ For a complete description, see svn_wc_merge5() for which this is
the (loggy) implementation.
*WORK_ITEMS will be allocated in RESULT_POOL. All temporary allocations
@@ -641,27 +664,6 @@ svn_wc__wipe_postupgrade(const char *dir
void *cancel_baton,
apr_pool_t *scratch_pool);
-/* Check whether a node is a working copy root or switched.
- *
- * If LOCAL_ABSPATH is the root of a working copy, set *WC_ROOT to TRUE,
- * otherwise to FALSE.
- *
- * If KIND is not null, set *KIND to the node type of LOCAL_ABSPATH.
- *
- * If LOCAL_ABSPATH is switched against its parent in the same working copy
- * set *SWITCHED to TRUE, otherwise to FALSE. SWITCHED can be NULL
- * if the result is not important.
- *
- * Use SCRATCH_POOL for temporary allocations.
- */
-svn_error_t *
-svn_wc__check_wc_root(svn_boolean_t *wc_root,
- svn_kind_t *kind,
- svn_boolean_t *switched,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
-
/* Ensure LOCAL_ABSPATH is still locked in DB. Returns the error
* SVN_ERR_WC_NOT_LOCKED if this is not the case.
*/
@@ -765,6 +767,19 @@ svn_wc__externals_find_target_dups(apr_a
apr_pool_t *pool,
apr_pool_t *scratch_pool);
+/* Revert tree LOCAL_ABSPATH to depth DEPTH and notify for all
+ reverts. */
+svn_error_t *
+svn_wc__revert_internal(svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_depth_t depth,
+ svn_boolean_t use_commit_times,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */