Author: cmpilato
Date: Fri Jul 20 18:38:25 2012
New Revision: 1363894

URL: http://svn.apache.org/viewvc?rev=1363894&view=rev
Log:
Sync with trunk changes.  (Merged /subversion/trunk: r1361338-1363892)

Added:
    subversion/branches/master-passphrase/subversion/tests/cmdline/wc_tests.py
      - copied unchanged from r1363892, 
subversion/trunk/subversion/tests/cmdline/wc_tests.py
Modified:
    subversion/branches/master-passphrase/   (props changed)
    subversion/branches/master-passphrase/CHANGES
    subversion/branches/master-passphrase/COMMITTERS
    subversion/branches/master-passphrase/configure.ac
    subversion/branches/master-passphrase/notes/authz_policy.txt
    subversion/branches/master-passphrase/notes/directory-index/schema.sql
    
subversion/branches/master-passphrase/subversion/include/private/svn_wc_private.h
    subversion/branches/master-passphrase/subversion/include/svn_fs.h
    subversion/branches/master-passphrase/subversion/libsvn_client/client.h
    subversion/branches/master-passphrase/subversion/libsvn_client/externals.c
    subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.c
    subversion/branches/master-passphrase/subversion/libsvn_fs_base/lock.c
    subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c
    subversion/branches/master-passphrase/subversion/libsvn_wc/lock.c
    subversion/branches/master-passphrase/subversion/libsvn_wc/status.c
    subversion/branches/master-passphrase/subversion/svnlook/main.c
    
subversion/branches/master-passphrase/subversion/tests/cmdline/basic_tests.py
    
subversion/branches/master-passphrase/subversion/tests/cmdline/merge_reintegrate_tests.py

Propchange: subversion/branches/master-passphrase/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1361338-1363892

Modified: subversion/branches/master-passphrase/CHANGES
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/CHANGES?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/CHANGES (original)
+++ subversion/branches/master-passphrase/CHANGES Fri Jul 20 18:38:25 2012
@@ -48,6 +48,41 @@ http://svn.apache.org/repos/asf/subversi
     *
 
 
+Version 1.7.6
+(XX YYY 2012, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.6
+
+ User-visible changes:
+  - Client- and server-side bugfixes:
+
+  - Client-side bugfixes:
+    * Fix "svn status -u --depth empty FILE" (r1348822, r1349215)
+    * Fix example output of 'svn help status' (issue #3962)
+    * svn propset of svn:eol-style might not notice related text changes 
(r1353572)
+    * sort output of 'svn propget -R' (r1355699)
+    * sort output of 'svn proplist' (r1355698)
+    * sort output of 'svn status' (r1341012)
+    * avoid a filestat per working copy find operation (r1340556)
+    * optimize 'svn upgrade' performance on large working copies (r1342984)
+    * allow 'file:///C:\repos' style arguments on Windows, like 1.6 (r1346765)
+    * fix ra_serf against Subversion 1.2 servers (r1349367)
+    * fix 'svn upgrade' on working copies with certain tree conflicts 
(r1345482)
+
+  - Server-side bugfixes:
+    * partial sync drops properties when converting to adds (issue #4184)
+    * replaying a copy and delete of an unreadable child fails (issue #4121)
+
+  - Other tool improvements and bugfixes:
+
+ Developer-visible changes:
+  - General:
+    * fix running tests against httpd 2.4 (r1291594)
+
+  - Bindings:
+    * JavaHL: Don't assert on some invalid input (r1354626, r1354652)
+    * JavaHL: Add missing new in 1.7 notifications (r1351772)
+
+
 Version 1.7.5
 (17 May 2012, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.5

Modified: subversion/branches/master-passphrase/COMMITTERS
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/COMMITTERS?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/COMMITTERS [UTF-8] (original)
+++ subversion/branches/master-passphrase/COMMITTERS [UTF-8] Fri Jul 20 
18:38:25 2012
@@ -39,7 +39,7 @@ Blanket commit access:
         pburba   Paul Burba <pbu...@collab.net>
        glasser   David Glasser <glas...@davidglasser.net>
            lgo   Lieven Govaerts <l...@mobsol.be>
-       hwright   Hyrum Wright <hyrum.wri...@wandisco.com>
+       hwright   Hyrum Wright <hy...@hyrumwright.org>
     vgeorgescu   Vlad Georgescu <vgeorge...@gmail.com>
        kameshj   Kamesh Jayachandran <kam...@collab.net>
       markphip   Mark Phippard <mphipp...@collab.net>

Modified: subversion/branches/master-passphrase/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/configure.ac?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/configure.ac (original)
+++ subversion/branches/master-passphrase/configure.ac Fri Jul 20 18:38:25 2012
@@ -1192,7 +1192,8 @@ SVN_CHECK_CTYPESGEN
 dnl decide whether we want to link against the RA/FS libraries
 AC_ARG_ENABLE(runtime-module-search,
 AS_HELP_STRING([--enable-runtime-module-search],
-               [Turn on dynamic loading of RA/FS libraries]),
+               [Turn on dynamic loading of RA/FS libraries including
+                third-party FS libraries]),
 [
     if test "$enableval" = "yes"; then
       use_dso=yes

Modified: subversion/branches/master-passphrase/notes/authz_policy.txt
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/notes/authz_policy.txt?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/notes/authz_policy.txt (original)
+++ subversion/branches/master-passphrase/notes/authz_policy.txt Fri Jul 20 
18:38:25 2012
@@ -111,6 +111,21 @@ WHAT USERS SHOULD EXPECT FROM PATH-BASED
    This situation is quite annoying for people who can't read all the
    changed-paths.
 
+   Notice that for the purposes of gating read and write access to
+   revision properties, Subversion never considers the user's *write*
+   access to the changed-paths.  To understand the reason behind this,
+   it helps to understand why revprop access is gated at all.
+   Subversion assumes that revprops for a given revision -- especially
+   the log message (svn:log) property -- are likely to reveal paths
+   modified in that revision.  It is precisely because Subversion
+   tries not to reveal unreadable paths to users that revprop access
+   is limited as described above.  So as long as the user has the
+   requisite read access to the changed-paths, it's okay if he or she
+   lacks write access to one or more of those paths when attempting to
+   set or change revprops -- the information Subversion is trying to
+   protect through its revprop access control is considered safe to
+   reveal to that user.
+
 
 6. KNOWN LEAKAGE OF UNREADABLE PATHS
 

Modified: subversion/branches/master-passphrase/notes/directory-index/schema.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/notes/directory-index/schema.sql?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/notes/directory-index/schema.sql 
(original)
+++ subversion/branches/master-passphrase/notes/directory-index/schema.sql Fri 
Jul 20 18:38:25 2012
@@ -33,18 +33,25 @@ CREATE TABLE txn (
   -- initially the same as id, but may refer to the originator
   -- transaction when tracking revprop changes and/or modified trees
   -- (q.v., obliterate)
-  txnid     integer NOT NULL REFERENCES txn(id),
+  txnid     integer NULL REFERENCES txn(id),
 
-  -- the revision that this transaction represents; as long as this is
-  -- null, the transaction has not yet been committed.
+  -- the revision that this transaction represents; for uncommitted
+  -- transactions, the revision in which it was created
   revision  integer NULL,
 
+  -- transaction state
+  -- T = transient (uncommitted), P = permanent (committed), D = dead
+  state     character(1) NOT NULL DEFAULT 'T',
+
   -- creation date, independent of the svn:date property
   created   timestamp NOT NULL,
 
   -- transaction author, independent of the svn:author property; may
   -- be null if the repository allows anonymous modifications
-  author    varchar NULL
+  author    varchar NULL,
+
+  -- sanity check: enumerated value validation
+  CONSTRAINT enumeration_validation CHECK (state IN ('T', 'P', 'D'))
 
   -- other attributes:
      -- revision properties
@@ -60,20 +67,28 @@ CREATE TABLE branch (
 
   -- the node to which this branch belongs; refers to the initial
   -- branch of the node
-  nodeid    integer NOT NULL REFERENCES branch(id),
+  nodeid    integer NULL REFERENCES branch(id),
 
   -- the source branch from which this branch was forked
   origin    integer NULL REFERENCES branch(id),
 
   -- the transaction in which the branch was created
-  txnid     integer NOT NULL REFERENCES txn(id)
+  txnid     integer NOT NULL REFERENCES txn(id),
+
+  -- mark branches in uncommitted transactions so that they can be
+  -- ignored by branch traversals
+  -- T = transient (uncommitted), P = permanent (committed)
+  state     character(1) NOT NULL DEFAULT 'T',
+
+  -- sanity check: enumerated value validation
+  CONSTRAINT enumeration_validation CHECK (state IN ('T', 'P')),
 
   -- sanity check: ye can't be yer own daddy
   CONSTRAINT genetic_diversity CHECK (id <> origin)
 );
 
+CREATE INDEX branch_txn_idx ON branch(txnid);
 CREATE INDEX branch_node_idx ON branch(nodeid);
-CREATE INDEX branch_successor_idx ON branch(origin);
 
 
 -- Node revisions -- DAG of versioned node changes
@@ -86,7 +101,7 @@ CREATE TABLE noderev (
   nodeid    integer NOT NULL REFERENCES branch(id),
 
   -- the node kind; immutable within the node
-  -- D = directory, F = file, L = link
+  -- D = directory, F = file, etc.
   kind      character(1) NOT NULL,
 
   -- this node revision's immediate predecessor
@@ -110,15 +125,27 @@ CREATE TABLE noderev (
 
   -- the change that produced this node revision
   -- A = added, D = deleted, M = modified, N = renamed, R = replaced
-  -- B = branched (requires kind=D + added + origin <> null)
+  -- B = branched (added + origin <> null)
   -- L = lazy branch, indicates that child lookup should be performed
-  --     on the origin (same constraints as for opcode=B)
+  --     on the origin (requires kind=D + added + origin <> null)
   opcode    character(1) NOT NULL,
 
+  -- mark noderevs of uncommitted transactions so that they can be
+  -- ignored by tree traversals
+  -- T = transient (uncommitted), P = permanent (committed)
+  state     character(1) NOT NULL DEFAULT 'T',
+
+  -- sanity check: enumerated value validation
+  CONSTRAINT enumeration_validation CHECK (
+    kind IN ('D', 'F')
+    AND state IN ('T', 'P')
+    AND opcode IN ('A', 'D', 'M', 'N', 'R', 'B', 'L')),
+
   -- sanity check: only directories can be lazy
-  CONSTRAINT minimal_workload CHECK (
-    ((opcode = 'B' OR opcode = 'L') AND kind = 'D' AND origin IS NOT NULL)
-    OR opcode <> 'B' AND opcode <> 'L'),
+  CONSTRAINT lazy_copies_make_more_work CHECK (
+    opcode <> 'B' AND opcode <> 'L'
+    OR (opcode = 'B' AND origin IS NOT NULL)
+    OR (opcode = 'L' AND kind = 'D' AND origin IS NOT NULL)),
 
   -- sanity check: ye can't be yer own daddy
   CONSTRAINT genetic_diversity CHECK (id <> origin),
@@ -132,79 +159,110 @@ CREATE TABLE noderev (
 );
 
 CREATE UNIQUE INDEX noderev_tree_idx ON noderev(parent, name, txnid);
+CREATE INDEX noderev_txn_idx ON noderev(txnid);
 CREATE INDEX nodefev_node_idx ON noderev(nodeid);
 CREATE INDEX noderev_successor_idx ON noderev(origin);
 
 
 -- Root directory
 
-INSERT INTO txn (id, txnid, revision, created) VALUES (0, 0, 0, 'EPOCH');
-INSERT INTO branch (id, nodeid, txnid) VALUES (0, 0, 0);
-INSERT INTO noderev (id, nodeid, kind, branch, name, txnid, opcode)
-  VALUES (0, 0, 'D', 0, '', 0, 'A');
-
-
---#  ---STATEMENT INSERT_TXN
---#  INSERT INTO txn (revnum, created, author)
---#    VALUES (:revnum, :created, :author);
---#  
---#  ---STATEMENT GET_TXN
---#  SELECT * FROM txn WHERE id = :id;
---#  
---#  ---STATEMENT FIND_TXN_BY_REVNUM
---#  SELECT * FROM txn WHERE revnum = :revnum;
---#  
---#  ---STATEMENT FIND_NEWEST_REVISION_TXN
---#  SELECT * FROM txn WHERE revnum IS NOT NULL ORDER BY revnum DESC LIMIT 1;
---#  
---#  ---STATEMENT SET_TXN_REVNUM
---#  UPDATE txn SET revnum = :revnum WHERE id = :id;
---#  
---#  ---STATEMENT INSERT_NODE
---#  INSERT INTO node (kind, txnid) VALUES (:kind, :txnid);
---#  
---#  ---STATEMENT GET_NODE
---#  SELECT * FROM node WHERE id = :id;
---#  
---#  ---STATEMENT INSERT_BRANCH
---#  INSERT INTO branch (origin, node, txnid)
---#    VALUES (:origin, :node, :txnid);
---#  
---#  ---STATEMENT GET_BRANCH
---#  SELECT * FROM branch WHERE id = :id;
---#  
---#  ---STATEMENT INSERT_NODEREV
---#  INSERT INTO noderev (origin, parent, branch,
---#                       iname, oname, txnid, change)
---#    VALUES (:origin, :parent, :branch,
---#            :iname, :oname, :txnid, :change);
---#  
---#  ---STATEMENT FIND_NODEREV_BY_NAME_FOR_TXN
---#  SELECT
---#    noderev.*,
---#    node.id AS node,
---#    node.kind AS kind
---#  FROM
---#    noderev JOIN branch ON noderev.branch = branch.id
---#    JOIN node ON branch.node = node.id
---#  WHERE
---#    parent = :parent AND iname = ":iname"
---#    AND noderev.txnid <= :txnid
---#  ORDER BY txnid DESC
---#  LIMIT 1;
---#  
---#  ---STATEMENT LIST_DIRECTORY_FOR_TXN
---#  SELECT
---#    noderev.*,
---#    node.id AS node,
---#    node.kind AS kind,
---#  FROM
---#    noderev JOIN branch ON noderev.branch = branch.id
---#    JOIN node ON branch.node = node.id
---#    JOIN (SELECT iname, MAX(txnid) AS maxtxn FROM noderev
---#          WHERE txnid <= :txnid) AS filter
---#      ON noderev.iname = filter.iname AND txnid = filter.maxtxn
---#  WHERE
---#    noderev.parent = :parent
---#    AND noderev.change <> 'D'
---#  ORDER BY iname ASC;
+INSERT INTO txn (id, txnid, revision, state, created) VALUES (0, 0, 0, 'P', 
'EPOCH');
+INSERT INTO branch (id, nodeid, txnid, state) VALUES (0, 0, 0, 'P');
+INSERT INTO noderev (id, nodeid, kind, branch, name, txnid, opcode, state)
+  VALUES (0, 0, 'D', 0, '', 0, 'A', 'P');
+
+
+---STATEMENT TXN_INSERT
+INSERT INTO txn (txnid, revision, created, author)
+  VALUES (:txnid, :revision, :created, :author);
+
+---STATEMENT TXN_UPDATE_INITIAL_TXNID
+UPDATE txn SET txnid = :id WHERE id = :id;
+
+---STATEMENT TXN_GET
+SELECT * FROM txn WHERE id = :id;
+
+---STATEMENT TXN_FIND_NEWEST
+SELECT * FROM txn WHERE state = 'P' ORDER BY id DESC LIMIT 1;
+
+---STATEMENT TXN_FIND_BY_REVISION
+SELECT * FROM txn WHERE revision = :revision AND state = 'P'
+ORDER BY id DESC LIMIT 1;
+
+---STATEMENT TXN_FIND_BY_REVISION_AND_TIMESTAMP
+SELECT * FROM txn
+WHERE revision = :revision AND created <= :created AND state = 'P'
+ORDER BY id DESC LIMIT 1;
+
+---STATEMENT TXN_COMMIT
+UPDATE txn SET
+  revision = :revision,
+  created = :created
+  state = 'P',
+WHERE id = :id;
+
+---STATEMENT TXN_ABORT
+UPDATE txn SET state = 'D' WHERE id = :id;
+
+---STATEMENT TXN_CLEANUP
+DELETE FROM txn WHERE id = :txnid;
+
+---STATEMENT BRANCH_INSERT
+INSERT INTO branch (nodeid, origin, txnid)
+  VALUES (:nodeid, :origin, :txnid);
+
+---STATEMENT BRANCH_UPDATE_INITIAL_NODEID
+UPDATE branch SET nodeid = :id WHERE id = :id;
+
+---STATEMENT BRANCH_UPDATE_TXNID
+UPDATE branch SET txnid = :new_txnid WHERE txnid = :old_txnid;
+
+---STATEMENT BRANCH_GET
+SELECT * FROM branch WHERE id = :id;
+
+---STATEMENT BRANCH_COMMIT
+UPDATE branch SET state = 'P' WHERE txnid = :txnid;
+
+---STATEMENT BRANCH_CLEANUP
+DELETE FROM branch WHERE txnid = :txnid;
+
+---STATEMENT NODEREV_INSERT
+INSERT INTO noderev (nodeid, kind, origin, parent, branch,
+                     name, dename, txnid, opcode)
+  VALUES (:nodeid, :kind, :origin, :parent, :branch,
+          :name, :dename, :txnid, :opcode);
+
+---STATEMENT NODEREV_UPDATE_TXNID
+UPDATE noderev SET txnid = :new_txnid WHERE txnid = :old_txnid;
+
+---STATEMENT NODEREV_DELAZIFY
+UPDATE noderev SET opcode = 'B' WHERE id = :id;
+
+---STATEMENT NODEREV_GET
+SELECT * FROM noderev WHERE id = :id;
+
+---STATEMENT NODEREV_COMMIT
+UPDATE noderev SET state = 'P' WHERE txnid = :txnid;
+
+---STATEMENT NODEREV_CLEANUP
+DELETE FROM noderev WHERE txnid = :txnid;
+
+---STATEMENT NODEREV_FIND_BY_NAME
+SELECT * FROM noderev
+WHERE parent = :parent AND name = :name
+      AND txnid <= :txnid AND state = 'P'
+ORDER BY txnid DESC LIMIT 1;
+
+---STATEMENT NODEREV_FIND_TRANSIENT_BY_NAME
+SELECT * FROM noderev
+WHERE parent = :parent AND name = :name
+      AND txnid <= :txnid AND state = 'T'
+ORDER BY txnid DESC LIMIT 1;
+
+---STATEMENT NODEREV_LIST_DIRECTORY
+SELECT * FROM noderev
+  JOIN (SELECT name, MAX(txnid) AS txnid FROM noderev
+        WHERE txnid <= :txnid AND state = 'P') AS filter
+    ON noderev.name = filter.name AND noderev.txnid = filter.txnid
+WHERE parent = :parent AND opcode <> 'D'
+ORDER BY name ASC;

Modified: 
subversion/branches/master-passphrase/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/private/svn_wc_private.h?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- 
subversion/branches/master-passphrase/subversion/include/private/svn_wc_private.h
 (original)
+++ 
subversion/branches/master-passphrase/subversion/include/private/svn_wc_private.h
 Fri Jul 20 18:38:25 2012
@@ -228,6 +228,9 @@ svn_wc__external_register(svn_wc_context
 /* Remove the external at LOCAL_ABSPATH from the working copy identified by
    WRI_ABSPATH using WC_CTX.
 
+   If DECLARATION_ONLY is TRUE, only remove the registration and leave the
+   on-disk structure untouched.
+
    If not NULL, call CANCEL_FUNC with CANCEL_BATON to allow canceling while
    removing the working copy files.
 
@@ -237,6 +240,7 @@ svn_error_t *
 svn_wc__external_remove(svn_wc_context_t *wc_ctx,
                         const char *wri_abspath,
                         const char *local_abspath,
+                        svn_boolean_t declaration_only,
                         svn_cancel_func_t cancel_func,
                         void *cancel_baton,
                         apr_pool_t *scratch_pool);

Modified: subversion/branches/master-passphrase/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_fs.h?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_fs.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_fs.h Fri Jul 
20 18:38:25 2012
@@ -2405,7 +2405,8 @@ svn_fs_get_locks(svn_fs_t *fs,
 
 /**
  * Append a textual list of all available FS modules to the stringbuf
- * @a output.
+ * @a output.  Third-party modules are only included if repository
+ * access has caused them to be loaded.
  *
  * @since New in 1.2.
  */

Modified: 
subversion/branches/master-passphrase/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/client.h?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/client.h 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/client.h Fri 
Jul 20 18:38:25 2012
@@ -963,32 +963,6 @@ svn_client__do_external_status(svn_clien
                                void *status_baton,
                                apr_pool_t *pool);
 
-/* Baton type for svn_wc__external_info_gatherer(). */
-typedef struct svn_client__external_func_baton_t
-{
-  apr_hash_t *externals_old;  /* Hash of old externals property values,
-                                 or NULL if the caller doesn't care. */
-  apr_hash_t *externals_new;  /* Hash of new externals property values,
-                                 or NULL if the caller doesn't care. */
-  apr_hash_t *ambient_depths; /* Hash of ambient depth values, or NULL
-                                 if the caller doesn't care. */
-  apr_pool_t *result_pool;    /* Pool to use for all stored values. */
-
-} svn_client__external_func_baton_t;
-
-
-/* This function gets invoked whenever external changes are encountered.
-   This implements the `svn_wc_external_update_t' interface, and can
-   be used with an svn_client__external_func_baton_t BATON to gather
-   information about changes to externals definitions. */
-svn_error_t *
-svn_client__external_info_gatherer(void *baton,
-                                   const char *local_abspath,
-                                   const svn_string_t *old_val,
-                                   const svn_string_t *new_val,
-                                   svn_depth_t depth,
-                                   apr_pool_t *scratch_pool);
-
 /* Baton for svn_client__dirent_fetcher */
 struct svn_client__dirent_fetcher_baton_t
 {

Modified: 
subversion/branches/master-passphrase/subversion/libsvn_client/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/externals.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/externals.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/externals.c 
Fri Jul 20 18:38:25 2012
@@ -63,7 +63,7 @@ relegate_dir_external(svn_wc_context_t *
 {
   svn_error_t *err = SVN_NO_ERROR;
 
-  err = svn_wc__external_remove(wc_ctx, wri_abspath, local_abspath,
+  err = svn_wc__external_remove(wc_ctx, wri_abspath, local_abspath, FALSE,
                                 cancel_func, cancel_baton, scratch_pool);
   if (err && (err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD))
     {
@@ -512,19 +512,18 @@ handle_external_item_removal(const svn_c
   SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
                            scratch_pool));
 
-  if (kind == svn_node_none)
-    return SVN_NO_ERROR; /* It's neither... Nothing to remove */
-
-  SVN_ERR(svn_wc_locked2(&lock_existed, NULL, ctx->wc_ctx,
-                         local_abspath, scratch_pool));
-
-  if (! lock_existed)
+  if (kind != svn_node_none)
     {
-      SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath,
-                                         ctx->wc_ctx, local_abspath,
-                                         FALSE,
-                                         scratch_pool,
-                                         scratch_pool));
+      SVN_ERR(svn_wc_locked2(&lock_existed, NULL, ctx->wc_ctx,
+                             local_abspath, scratch_pool));
+
+      if (! lock_existed)
+        {
+          SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath,
+                                             ctx->wc_ctx, local_abspath,
+                                             FALSE,
+                                             scratch_pool, scratch_pool));
+        }
     }
 
   /* We don't use relegate_dir_external() here, because we know that
@@ -532,7 +531,7 @@ handle_external_item_removal(const svn_c
      going to need this directory, and therefore it's better to
      leave stuff where the user expects it. */
   err = svn_wc__external_remove(ctx->wc_ctx, defining_abspath,
-                                local_abspath,
+                                local_abspath, (kind == svn_node_none),
                                 ctx->cancel_func, ctx->cancel_baton,
                                 scratch_pool);
 
@@ -791,6 +790,7 @@ handle_externals_change(svn_client_ctx_t
       const char *old_defining_abspath;
       svn_wc_external_item2_t *new_item;
       const char *target_abspath;
+      svn_boolean_t under_root;
 
       new_item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item2_t *);
 
@@ -799,8 +799,20 @@ handle_externals_change(svn_client_ctx_t
       if (ctx->cancel_func)
         SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
-      target_abspath = svn_dirent_join(local_abspath, new_item->target_dir,
-                                       iterpool);
+      SVN_ERR(svn_dirent_is_under_root(&under_root, &target_abspath,
+                                       local_abspath, new_item->target_dir,
+                                       iterpool));
+
+      if (! under_root)
+        {
+          return svn_error_createf(
+                    SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
+                    _("Path '%s' is not in the working copy"),
+                    svn_dirent_local_style(
+                        svn_dirent_join(local_abspath, new_item->target_dir,
+                                        iterpool),
+                        iterpool));
+        }
 
       old_defining_abspath = apr_hash_get(old_externals, target_abspath,
                                           APR_HASH_KEY_STRING);
@@ -984,13 +996,26 @@ svn_client__export_externals(apr_hash_t 
         {
           const char *item_abspath;
           const char *new_url;
+          svn_boolean_t under_root;
           svn_wc_external_item2_t *item = APR_ARRAY_IDX(items, i,
                                                 svn_wc_external_item2_t *);
 
           svn_pool_clear(sub_iterpool);
 
-          item_abspath = svn_dirent_join(local_abspath, item->target_dir,
-                                         sub_iterpool);
+          SVN_ERR(svn_dirent_is_under_root(&under_root, &item_abspath,
+                                           local_abspath, item->target_dir,
+                                           sub_iterpool));
+
+          if (! under_root)
+            {
+              return svn_error_createf(
+                        SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
+                        _("Path '%s' is not in the working copy"),
+                        svn_dirent_local_style(
+                            svn_dirent_join(local_abspath, item->target_dir,
+                                            sub_iterpool),
+                            sub_iterpool));
+            }
 
           SVN_ERR(svn_wc__resolve_relative_external_url(&new_url, item,
                                                         repos_root_url,
@@ -1092,35 +1117,3 @@ svn_client__do_external_status(svn_clien
   return SVN_NO_ERROR;
 }
 
-
-/* Implements the `svn_wc_externals_update_t' interface. */
-svn_error_t *
-svn_client__external_info_gatherer(void *baton,
-                                   const char *local_abspath,
-                                   const svn_string_t *old_value,
-                                   const svn_string_t *new_value,
-                                   svn_depth_t depth,
-                                   apr_pool_t *scratch_pool)
-{
-  svn_client__external_func_baton_t *efb = baton;
-
-  local_abspath = apr_pstrdup(efb->result_pool, local_abspath);
-
-  if (efb->externals_old != NULL && old_value != NULL)
-    apr_hash_set(efb->externals_old, local_abspath, APR_HASH_KEY_STRING,
-                 apr_pstrndup(efb->result_pool,
-                              old_value->data, old_value->len));
-
-  if (efb->externals_new != NULL && new_value != NULL)
-    apr_hash_set(efb->externals_new, local_abspath, APR_HASH_KEY_STRING,
-                 apr_pstrndup(efb->result_pool,
-                              new_value->data, new_value->len));
-
-  if (efb->ambient_depths != NULL)
-    apr_hash_set(efb->ambient_depths, local_abspath, APR_HASH_KEY_STRING,
-                 svn_depth_to_word(depth));
-
-  return SVN_NO_ERROR;
-}
-
-

Modified: subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.c Fri 
Jul 20 18:38:25 2012
@@ -28,6 +28,7 @@
 #include <apr_md5.h>
 #include <apr_thread_mutex.h>
 #include <apr_uuid.h>
+#include <apr_strings.h>
 
 #include "svn_ctype.h"
 #include "svn_types.h"
@@ -65,27 +66,37 @@ svn_mutex__t *common_pool_lock;
 
 /* --- Utility functions for the loader --- */
 
-static const struct fs_type_defn {
+struct fs_type_defn {
   const char *fs_type;
   const char *fsap_name;
   fs_init_func_t initfunc;
-} fs_modules[] = {
+  struct fs_type_defn *next;
+};
+
+static struct fs_type_defn base_defn =
   {
     SVN_FS_TYPE_BDB, "base",
 #ifdef SVN_LIBSVN_FS_LINKS_FS_BASE
-    svn_fs_base__init
+    svn_fs_base__init,
+#else
+    NULL,
 #endif
-  },
+    NULL
+  };
 
+static struct fs_type_defn fsfs_defn =
   {
     SVN_FS_TYPE_FSFS, "fs",
 #ifdef SVN_LIBSVN_FS_LINKS_FS_FS
-    svn_fs_fs__init
+    svn_fs_fs__init,
+#else
+    NULL,
 #endif
-  },
+    &base_defn
+  };
+
+static struct fs_type_defn *fs_modules = &fsfs_defn;
 
-  { NULL }
-};
 
 static svn_error_t *
 load_module(fs_init_func_t *initfunc, const char *name, apr_pool_t *pool)
@@ -99,6 +110,15 @@ load_module(fs_init_func_t *initfunc, co
     const char *libname;
     const char *funcname;
     apr_status_t status;
+    const char *p;
+
+    /* Demand a simple alphanumeric name so that the generated DSO
+       name is sensible. */
+    for (p = name; *p; ++p)
+      if (!svn_ctype_isalnum(*p))
+        return svn_error_createf(SVN_ERR_FS_UNKNOWN_FS_TYPE, NULL,
+                                 _("Invalid name for FS type '%s'"),
+                                 name);
 
     libname = apr_psprintf(pool, "libsvn_fs_%s-%d.so.0",
                            name, SVN_VER_MAJOR);
@@ -173,21 +193,66 @@ get_library_vtable_direct(fs_library_vta
   return SVN_NO_ERROR;
 }
 
+#if defined(SVN_USE_DSO) && APR_HAS_DSO
+/* Return *FST for the third party FS_TYPE */
+static svn_error_t *
+get_or_allocate_third(struct fs_type_defn **fst,
+                      const char *fs_type)
+{
+  fst = &fs_modules;
+
+  while (*fst)
+    fst = &(*fst)->next;
+
+  *fst = apr_palloc(common_pool, sizeof(struct fs_type_defn));
+  (*fst)->fs_type = apr_pstrdup(common_pool, fs_type);
+  (*fst)->fsap_name = (*fst)->fs_type;
+  (*fst)->initfunc = NULL;
+  (*fst)->next = NULL;
+
+  return SVN_NO_ERROR;
+}
+#endif
+
 /* Fetch a library vtable by FS type. */
 static svn_error_t *
 get_library_vtable(fs_library_vtable_t **vtable, const char *fs_type,
                    apr_pool_t *pool)
 {
-  const struct fs_type_defn *fst;
+  struct fs_type_defn **fst = &fs_modules;
 
-  for (fst = fs_modules; fst->fs_type; fst++)
+  while (*fst)
     {
-      if (strcmp(fs_type, fst->fs_type) == 0)
-        return get_library_vtable_direct(vtable, fst, pool);
+      if (strcmp(fs_type, (*fst)->fs_type) == 0)
+        break;
+      (*fst) = (*fst)->next;
     }
 
-  return svn_error_createf(SVN_ERR_FS_UNKNOWN_FS_TYPE, NULL,
-                           _("Unknown FS type '%s'"), fs_type);
+#if defined(SVN_USE_DSO) && APR_HAS_DSO
+  /* Third party FS modules that are unknown at compile time.
+     
+     A third party FS is identified by the file fs-type containing a
+     third party name, say "foo".  The loader will load the DSO with
+     the name "libsvn_fs_foo" and use the entry point with the name
+     "svn_fs_foo__init".
+
+     Note: the BDB and FSFS modules don't follow this naming scheme
+     and this allows them to be used to test the third party loader.
+     Change the content of fs-type to "base" in a BDB filesystem or to
+     "fs" in an FSFS filesystem and they will be loaded as third party
+     modules. */
+  if (! *fst)
+    {
+      if (!common_pool)  /* Best-effort init, see get_library_vtable_direct. */
+        SVN_ERR(svn_fs_initialize(NULL));
+      SVN_MUTEX__WITH_LOCK(common_pool_lock,
+                           get_or_allocate_third(fst, fs_type));
+    }
+#endif
+  if (!*fst)
+    return svn_error_createf(SVN_ERR_FS_UNKNOWN_FS_TYPE, NULL,
+                             _("Unknown FS type '%s'"), fs_type);
+  return get_library_vtable_direct(vtable, *fst, pool);
 }
 
 svn_error_t *
@@ -1414,11 +1479,11 @@ svn_error_t *
 svn_fs_print_modules(svn_stringbuf_t *output,
                      apr_pool_t *pool)
 {
-  const struct fs_type_defn *defn;
+  const struct fs_type_defn *defn = fs_modules;
   fs_library_vtable_t *vtable;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
-  for (defn = fs_modules; defn->fs_type != NULL; ++defn)
+  while (defn)
     {
       char *line;
       svn_error_t *err;
@@ -1431,6 +1496,7 @@ svn_fs_print_modules(svn_stringbuf_t *ou
           if (err->apr_err == SVN_ERR_FS_UNKNOWN_FS_TYPE)
             {
               svn_error_clear(err);
+              defn = defn->next;
               continue;
             }
           else
@@ -1440,6 +1506,7 @@ svn_fs_print_modules(svn_stringbuf_t *ou
       line = apr_psprintf(iterpool, "* fs_%s : %s\n",
                           defn->fsap_name, vtable->get_description());
       svn_stringbuf_appendcstr(output, line);
+      defn = defn->next;
     }
 
   svn_pool_destroy(iterpool);

Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_base/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_base/lock.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_base/lock.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_base/lock.c Fri 
Jul 20 18:38:25 2012
@@ -36,6 +36,7 @@
 #include "util/fs_skels.h"
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_fs_util.h"
+#include "private/svn_subr_private.h"
 
 
 /* Add LOCK and its associated LOCK_TOKEN (associated with PATH) as
@@ -394,9 +395,9 @@ svn_fs_base__get_lock(svn_lock_t **lock,
 }
 
 /* Implements `svn_fs_get_locks_callback_t', spooling lock information
-   to disk as the filesystem provides it.  BATON is an 'apr_file_t *'
-   object pointing to open, writable spool file.  We'll write the
-   spool file with a format like so:
+   to a stream as the filesystem provides it.  BATON is an 'svn_stream_t *'
+   object pointing to the stream.  We'll write the spool stream with a
+   format like so:
 
       SKEL1_LEN "\n" SKEL1 "\n" SKEL2_LEN "\n" SKEL2 "\n" ...
 
@@ -408,18 +409,20 @@ spool_locks_info(void *baton,
                  apr_pool_t *pool)
 {
   svn_skel_t *lock_skel;
-  apr_file_t *spool_file = (apr_file_t *)baton;
+  svn_stream_t *stream = baton;
   const char *skel_len;
   svn_stringbuf_t *skel_buf;
+  apr_size_t len;
 
   SVN_ERR(svn_fs_base__unparse_lock_skel(&lock_skel, lock, pool));
   skel_buf = svn_skel__unparse(lock_skel, pool);
   skel_len = apr_psprintf(pool, "%" APR_SIZE_T_FMT "\n", skel_buf->len);
-  SVN_ERR(svn_io_file_write_full(spool_file, skel_len, strlen(skel_len),
-                                 NULL, pool));
-  SVN_ERR(svn_io_file_write_full(spool_file, skel_buf->data,
-                                 skel_buf->len, NULL, pool));
-  return svn_io_file_write_full(spool_file, "\n", 1, NULL, pool);
+  len = strlen(skel_len);
+  SVN_ERR(svn_stream_write(stream, skel_len, &len));
+  len = skel_buf->len;
+  SVN_ERR(svn_stream_write(stream, skel_buf->data, &len));
+  len = 1;
+  return svn_stream_write(stream, "\n", &len);
 }
 
 
@@ -427,7 +430,7 @@ struct locks_get_args
 {
   const char *path;
   svn_depth_t depth;
-  apr_file_t *spool_file;
+  svn_stream_t *stream;
 };
 
 
@@ -436,7 +439,7 @@ txn_body_get_locks(void *baton, trail_t 
 {
   struct locks_get_args *args = baton;
   return svn_fs_bdb__locks_get(trail->fs, args->path, args->depth,
-                               spool_locks_info, args->spool_file,
+                               spool_locks_info, args->stream,
                                trail, trail->pool);
 }
 
@@ -450,7 +453,6 @@ svn_fs_base__get_locks(svn_fs_t *fs,
                        apr_pool_t *pool)
 {
   struct locks_get_args args;
-  apr_off_t offset = 0;
   svn_stream_t *stream;
   svn_stringbuf_t *buf;
   svn_boolean_t eof;
@@ -460,14 +462,14 @@ svn_fs_base__get_locks(svn_fs_t *fs,
 
   args.path = svn_fs__canonicalize_abspath(path, pool);
   args.depth = depth;
-  SVN_ERR(svn_io_open_uniquely_named(&(args.spool_file), NULL, NULL, NULL,
-                                     NULL, svn_io_file_del_on_close,
-                                     pool, pool));
+  /* Enough for 100+ locks if the comments are small. */
+  args.stream = svn_stream__from_spillbuf(4 * 1024  /* blocksize */,
+                                          64 * 1024 /* maxsize */,
+                                          pool);
   SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_get_locks, &args, FALSE, pool));
 
-  /* Rewind the spool file, then re-read it, calling GET_LOCKS_FUNC(). */
-  SVN_ERR(svn_io_file_seek(args.spool_file, APR_SET, &offset, pool));
-  stream = svn_stream_from_aprfile2(args.spool_file, FALSE, pool);
+  /* Read the stream calling GET_LOCKS_FUNC(). */
+  stream = args.stream;
 
   while (1)
     {

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c Fri 
Jul 20 18:38:25 2012
@@ -1288,6 +1288,7 @@ svn_error_t *
 svn_wc__external_remove(svn_wc_context_t *wc_ctx,
                         const char *wri_abspath,
                         const char *local_abspath,
+                        svn_boolean_t declaration_only,
                         svn_cancel_func_t cancel_func,
                         void *cancel_baton,
                         apr_pool_t *scratch_pool)
@@ -1303,6 +1304,9 @@ svn_wc__external_remove(svn_wc_context_t
   SVN_ERR(svn_wc__db_external_remove(wc_ctx->db, local_abspath, wri_abspath,
                                      NULL, scratch_pool));
 
+  if (declaration_only)
+    return SVN_NO_ERROR;
+
   if (kind == svn_kind_dir)
     SVN_ERR(svn_wc_remove_from_revision_control2(wc_ctx, local_abspath,
                                                  TRUE, FALSE,

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/lock.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/lock.c Fri Jul 
20 18:38:25 2012
@@ -1529,6 +1529,21 @@ svn_wc__acquire_write_lock(const char **
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
 
+  if (lock_anchor && kind == svn_kind_dir)
+    {
+      svn_boolean_t is_wcroot;
+
+      SVN_ERR_ASSERT(lock_root_abspath != NULL);
+
+      /* Perform a cheap check to avoid looking for a parent working copy,
+         which might be very expensive in some specific scenarios */
+      SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
+                                   scratch_pool));
+
+      if (is_wcroot)
+        lock_anchor = FALSE;
+    }
+
   if (lock_anchor)
     {
       const char *parent_abspath;

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/status.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/status.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/status.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/status.c Fri Jul 
20 18:38:25 2012
@@ -1354,7 +1354,19 @@ get_dir_status(const struct walk_status_
   /* Handle "this-dir" first. */
   if (! skip_this_dir)
     {
-#ifdef HAVE_SYMLINK
+      /* This code is not conditional on HAVE_SYMLINK as some systems that do
+         not allow creating symlinks (!HAVE_SYMLINK) can still encounter
+         symlinks (or in case of Windows also 'Junctions') created by other
+         methods.
+
+         Without this block a working copy in the root of a junction is
+         reported as an obstruction, because the junction itself is reported as
+         special.
+
+         Systems that have no symlink support at all, would always see
+         dirent->special as FALSE, so even there enabling this code shouldn't
+         produce problems.
+       */
       if (dirent->special)
         {
           svn_io_dirent2_t *this_dirent = svn_io_dirent2_dup(dirent, iterpool);
@@ -1375,7 +1387,6 @@ get_dir_status(const struct walk_status_
                                         iterpool));
         }
      else
-#endif
         SVN_ERR(send_status_structure(wb, local_abspath,
                                       parent_repos_root_url,
                                       parent_repos_relpath,

Modified: subversion/branches/master-passphrase/subversion/svnlook/main.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnlook/main.c?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnlook/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svnlook/main.c Fri Jul 20 
18:38:25 2012
@@ -1282,6 +1282,30 @@ print_tree(svn_fs_root_t *root,
 }
 
 
+/* Set *BASE_REV to the revision on which the target root specified in
+   C is based, or to SVN_INVALID_REVNUM when C represents "revision
+   0" (because that revision isn't based on another revision). */
+static svn_error_t *
+get_base_rev(svn_revnum_t *base_rev, svnlook_ctxt_t *c, apr_pool_t *pool)
+{
+  if (c->is_revision)
+    {
+      *base_rev = c->rev_id - 1;
+    }
+  else
+    {
+      *base_rev = svn_fs_txn_base_revision(c->txn);
+
+      if (! SVN_IS_VALID_REVNUM(*base_rev))
+        return svn_error_createf
+          (SVN_ERR_FS_NO_SUCH_REVISION, NULL,
+           _("Transaction '%s' is not based on a revision; how odd"),
+           c->txn_name);
+    }
+  return SVN_NO_ERROR;
+}
+
+
 
 /*** Subcommand handlers. ***/
 
@@ -1388,16 +1412,9 @@ do_dirs_changed(svnlook_ctxt_t *c, apr_p
   svn_repos_node_t *tree;
 
   SVN_ERR(get_root(&root, c, pool));
-  if (c->is_revision)
-    base_rev_id = c->rev_id - 1;
-  else
-    base_rev_id = svn_fs_txn_base_revision(c->txn);
-
-  if (! SVN_IS_VALID_REVNUM(base_rev_id))
-    return svn_error_createf
-      (SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-       _("Transaction '%s' is not based on a revision; how odd"),
-       c->txn_name);
+  SVN_ERR(get_base_rev(&base_rev_id, c, pool));
+  if (base_rev_id == SVN_INVALID_REVNUM)
+    return SVN_NO_ERROR;
 
   SVN_ERR(generate_delta_tree(&tree, c->repos, root, base_rev_id, pool));
   if (tree)
@@ -1493,16 +1510,9 @@ do_changed(svnlook_ctxt_t *c, apr_pool_t
   svn_repos_node_t *tree;
 
   SVN_ERR(get_root(&root, c, pool));
-  if (c->is_revision)
-    base_rev_id = c->rev_id - 1;
-  else
-    base_rev_id = svn_fs_txn_base_revision(c->txn);
-
-  if (! SVN_IS_VALID_REVNUM(base_rev_id))
-    return svn_error_createf
-      (SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-       _("Transaction '%s' is not based on a revision; how odd"),
-       c->txn_name);
+  SVN_ERR(get_base_rev(&base_rev_id, c, pool));
+  if (base_rev_id == SVN_INVALID_REVNUM)
+    return SVN_NO_ERROR;
 
   SVN_ERR(generate_delta_tree(&tree, c->repos, root, base_rev_id, pool));
   if (tree)
@@ -1521,16 +1531,9 @@ do_diff(svnlook_ctxt_t *c, apr_pool_t *p
   svn_repos_node_t *tree;
 
   SVN_ERR(get_root(&root, c, pool));
-  if (c->is_revision)
-    base_rev_id = c->rev_id - 1;
-  else
-    base_rev_id = svn_fs_txn_base_revision(c->txn);
-
-  if (! SVN_IS_VALID_REVNUM(base_rev_id))
-    return svn_error_createf
-      (SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-       _("Transaction '%s' is not based on a revision; how odd"),
-       c->txn_name);
+  SVN_ERR(get_base_rev(&base_rev_id, c, pool));
+  if (base_rev_id == SVN_INVALID_REVNUM)
+    return SVN_NO_ERROR;
 
   SVN_ERR(generate_delta_tree(&tree, c->repos, root, base_rev_id, pool));
   if (tree)

Modified: 
subversion/branches/master-passphrase/subversion/tests/cmdline/basic_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/cmdline/basic_tests.py?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- 
subversion/branches/master-passphrase/subversion/tests/cmdline/basic_tests.py 
(original)
+++ 
subversion/branches/master-passphrase/subversion/tests/cmdline/basic_tests.py 
Fri Jul 20 18:38:25 2012
@@ -2983,6 +2983,7 @@ def delete_conflicts_one_of_many(sbox):
   verify_file_deleted("failed to remove conflict file",
                       sbox.ospath('A/D/G/rho.mine'))
 
+
 ########################################################################
 # Run the tests
 

Modified: 
subversion/branches/master-passphrase/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1363894&r1=1363893&r2=1363894&view=diff
==============================================================================
--- 
subversion/branches/master-passphrase/subversion/tests/cmdline/merge_reintegrate_tests.py
 (original)
+++ 
subversion/branches/master-passphrase/subversion/tests/cmdline/merge_reintegrate_tests.py
 Fri Jul 20 18:38:25 2012
@@ -1002,18 +1002,18 @@ def reintegrate_with_subtree_mergeinfo(s
   # reflects that the same revisions have been applied across all of A_COPY,
   # then the reintegrate merge should succeed.  We'll try that case first.
   #
-  #   A_COPY_3       4--------9---
+  #   A_COPY_3       4-------[9]--
   #                 /          \
-  #                /            \c.
+  #                /            \
   #   A     -1--------5-6-7-8---10-------------------WC--
-  #            \ \              (D)         \        /r.
-  #             \ \                    (mu)  \s.    /
+  #            \ \              (D)         \        /reint.
+  #             \ \                    (mu)  \      /
   #   A_COPY     2-\--------------------12---13--14------
-  #                 \                   /c.
+  #                 \                   /
   #                  \                 /
-  #   A_COPY_2        3--------------11---
+  #   A_COPY_2        3-------------[11]--
   #
-  #   Key: c. = cherry-pick, s. = sync, r. = reintegrate.
+  #   Key: [#] = cherry-picked revision; (foo) = merge of subtree 'foo'
   #   Note: These diagrams show an overview and do not capture every detail.
 
   # r9 - Make a text change to A_COPY_3/D/gamma
@@ -1189,16 +1189,16 @@ def reintegrate_with_subtree_mergeinfo(s
   # merge should fail, but should provide a helpful message as to where the
   # problems are.
   #
-  #   A_COPY_3        4--------9---
+  #   A_COPY_3        4-------[9]--
   #                  /          \
-  #                 /            \c.        [-8]___
+  #                 /            \          [-8]___
   #   A     -1---------5-6-7-8---10----------------\-------WC--
-  #            \ \               (D)        \       \      /r.
-  #             \ \                    (mu)  \s.     \c.  /
+  #            \ \               (D)        \       \      /reint.
+  #             \ \                    (mu)  \       \    /
   #   A_COPY     2-\--------------------12---13--14--15--------
-  #                 \                   /c.          (D)
+  #                 \                   /            (D)
   #                  \                 /
-  #   A_COPY_2        3--------------11---
+  #   A_COPY_2        3-------------[11]--
 
   # First revert the previous reintegrate merge
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1269,16 +1269,16 @@ def reintegrate_with_subtree_mergeinfo(s
   #      of 'trunk' was previously merged to 'branch'
   #
   #                                       Step:   A   B    C   D    E
-  #   A_COPY_3    ----9---
+  #   A_COPY_3    ---[9]--
   #              /     \                      (D/g.->
-  #             /       \c.        [-8]___     D/g.m.) (D/g.m.)
+  #             /       \          [-8]___     D/g.m.) (D/g.m.)
   #   A     ------------10----------------\------16-------18--------WC
-  #          \\         (D)        \       \        \        \      /r.
-  #           \\              (mu)  \s.     \c.      \s.      \s.  /
+  #          \\         (D)        \       \        \        \      /reint.
+  #           \\              (mu)  \       \        \        \    /
   #   A_COPY   -\--------------12---13--14--15-------17-------19------
-  #              \             /c.          (D)
+  #              \             /            (D)
   #               \           /
-  #   A_COPY_2     ---------11---
+  #   A_COPY_2     --------[11]--
 
   # r16 - A) REPOS-to-REPOS rename of A/D/gamma to A/D/gamma_moved.  Since
   # r874258 WC-to-WC moves won't create mergeinfo on the dest if the source


Reply via email to