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/11 00:07:31 UTC

svn commit: r984234 [16/20] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ notes/ notes/api-errata/ notes/obliterate/ notes/obliterate/fspec-cc1/ notes/rename-tracking/ notes/svnpatch/ notes/tree-conflicts/ note...

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h Tue Aug 10 22:07:24 2010
@@ -180,7 +180,7 @@ typedef enum {
     svn_wc__db_status_normal,
 
     /* The node has been added (potentially obscuring a delete or move of
-       the BASE node; see BASE_SHADOWED param). The text will be marked as
+       the BASE node; see HAVE_BASE param). The text will be marked as
        modified, and if properties exist, they will be marked as modified.
 
        In many cases svn_wc__db_status_added means any of added, moved-here
@@ -714,6 +714,27 @@ svn_wc__db_base_get_info(svn_wc__db_stat
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
 
+/* Just like svn_wc__db_base_get_info, but always reads information
+   from inside the parent of LOCAL_ABSPATH, to allow reading the
+   information of a node that is obstructed by a separate working
+   copy.
+   
+   ### BH: This information is necessary for svn_wc_add3()'s
+   ###     checkout integration support. Even after we switch to
+   ###     a single db.
+   */
+svn_error_t *
+svn_wc__db_base_get_info_from_parent(svn_wc__db_status_t *status,
+                                     svn_wc__db_kind_t *kind,
+                                     svn_revnum_t *revision,
+                                     const char **repos_relpath,
+                                     const char **repos_root_url,
+                                     const char **repos_uuid,
+                                     svn_wc__db_t *db,
+                                     const char *local_abspath,
+                                     apr_pool_t *result_pool,
+                                     apr_pool_t *scratch_pool);
+
 
 /* Set *PROPVAL to the value of the property named PROPNAME of the node
    LOCAL_ABSPATH in the BASE tree.
@@ -787,6 +808,13 @@ svn_wc__db_base_get_dav_cache(apr_hash_t
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 
+/* Recursively clear the dav cache for LOCAL_ABSPATH.  Use
+   SCRATCH_POOL for temporary allocations. */
+svn_error_t *
+svn_wc__db_base_clear_dav_cache_recursive(svn_wc__db_t *db,
+                                          const char *local_abspath,
+                                          apr_pool_t *scratch_pool);
+
 
 /* ### how to handle depth? empty != absent. thus, record depth on each
    ### directory? empty, files, immediates, infinity. recording depth
@@ -861,7 +889,7 @@ typedef enum {
    ### This is temporary - callers should not be looking at the file
    directly.
 
-   Allocate the stream in RESULT_POOL. */
+   Allocate the path in RESULT_POOL. */
 svn_error_t *
 svn_wc__db_pristine_get_path(const char **pristine_abspath,
                              svn_wc__db_t *db,
@@ -870,6 +898,17 @@ svn_wc__db_pristine_get_path(const char 
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
+/* Set *PRISTINE_ABSPATH to the path under WCROOT_ABSPATH that will be
+   used by the pristine text identified by SHA1_CHECKSUM.  The file
+   need not exist.
+ */
+svn_error_t *
+svn_wc__db_pristine_get_future_path(const char **pristine_abspath,
+                                    const char *wcroot_abspath,
+                                    svn_checksum_t *sha1_checksum,
+                                    apr_pool_t *result_pool,
+                                    apr_pool_t *scratch_pool);
+
 
 /* Set *CONTENTS to a readable stream that will yield the pristine text
    identified by CHECKSUM (### which should/must be its SHA-1 checksum?).
@@ -956,6 +995,13 @@ svn_wc__db_pristine_remove(svn_wc__db_t 
                            apr_pool_t *scratch_pool);
 
 
+/* Remove all unreferenced pristines belonging to WRI_ABSPATH in DB. */
+svn_error_t *
+svn_wc__db_pristine_cleanup(svn_wc__db_t *db,
+                            const char *wri_abspath,
+                            apr_pool_t *scratch_pool);
+
+
 /* ### check for presence, according to the given mode (on how hard we
    ### should examine things)
 */
@@ -1241,7 +1287,7 @@ svn_wc__db_op_revert(svn_wc__db_t *db,
 
 /* Return a hash @a *tree_conflicts of all the children of @a
  * local_abspath that are in tree conflicts.  The hash maps local
- * abspaths to pointers to svn_wc_conflict_description2_t, all
+ * basenames to pointers to svn_wc_conflict_description2_t, all
  * allocated in result pool.
  */
 svn_error_t *
@@ -1329,9 +1375,9 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
      ORIGINAL_ROOT_URL       NULL
      ORIGINAL_UUID           NULL
      ORIGINAL_REVISION       SVN_INVALID_REVNUM
-     TEXT_MOD                n/a (always available)
      PROPS_MOD               n/a (always available)
-     BASE_SHADOWED           n/a (always available)
+     HAVE_BASE               n/a (always available)
+     HAVE_WORK               n/a (always available)
      CONFLICTED              FALSE
      LOCK                    NULL
 
@@ -1342,7 +1388,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
 
      svn_wc__db_status_added
      svn_wc__db_status_obstructed_add
-       A node has been added/copied/moved to here. See BASE_SHADOWED to see
+       A node has been added/copied/moved to here. See HAVE_BASE to see
        if this change overwrites a BASE node. Use scan_addition() to resolve
        whether this has been added, copied, or moved, and the details of the
        operation (this function only looks at LOCAL_ABSPATH, but resolving
@@ -1365,9 +1411,8 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
 
      svn_wc__db_status_excluded
        The node has been excluded from the working copy tree. This may
-       be an exclusion from the BASE tree, or an exclusion for a child
-       node of a copy/move to an ancestor (see BASE_SHADOWED to determine
-       the situation).
+       be an exclusion from the BASE tree, or an exclusion in the
+       WORKING tree for a child node of a copied/moved parent.
 
      svn_wc__db_status_not_present
        This is a node from the BASE tree, has been marked as "not-present"
@@ -1420,7 +1465,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
    ###   repos_* will be NULL
    ###   changed_rev will be SVN_INVALID_REVNUM
    ###   changed_date will be 0
-   ###   changed_author will be NULLn
+   ###   changed_author will be NULL
    ###   status will be svn_wc__db_status_added
    ###   text_mod will be TRUE
    ###   prop_mod will be TRUE if any props have been set
@@ -1460,10 +1505,9 @@ svn_wc__db_read_info(svn_wc__db_status_t
                      svn_revnum_t *original_revision,
 
                      /* ### the followed are derived fields */
-                     svn_boolean_t *text_mod,  /* ### possibly modified */
                      svn_boolean_t *props_mod,
-                     svn_boolean_t *base_shadowed,  /* ### WORKING shadows a
-                                                       ### deleted BASE? */
+                     svn_boolean_t *have_base,
+                     svn_boolean_t *have_work,
 
                      svn_boolean_t *conflicted,
 
@@ -1613,6 +1657,17 @@ svn_wc__db_node_hidden(svn_boolean_t *hi
    ### changelist usage -- we may already assume the list fits in memory.
 */
 
+/* Checks if LOCAL_ABSPATH has a parent directory that knows about its
+ * existance. Set *IS_ROOT to FALSE if a parent is found, and to TRUE
+ * if there is no such parent.
+ */
+svn_error_t *
+svn_wc__db_is_wcroot(svn_boolean_t *is_root,
+                     svn_wc__db_t *db,
+                     const char *local_abspath,
+                     apr_pool_t *scratch_pool);
+
+
 
 /* @} */
 
@@ -1683,6 +1738,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
                          const apr_array_header_t *new_children,
                          apr_hash_t *new_dav_cache,
                          svn_boolean_t keep_changelist,
+                         svn_boolean_t no_unlock,
                          const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool);
 
@@ -2015,6 +2071,15 @@ svn_wc__db_upgrade_apply_dav_cache(svn_s
                                    apr_pool_t *scratch_pool);
 
 
+/* ### need much more docco
+
+   ### this function should be called within a sqlite transaction. it makes
+   ### assumptions around this fact.
+
+   Apply the various sets of properties to the database nodes based on
+   their existence/presence, the current state of the node, and the original
+   format of the working copy which provided these property sets.
+*/
 svn_error_t *
 svn_wc__db_upgrade_apply_props(svn_sqlite__db_t *sdb,
                                const char *local_relpath,
@@ -2308,21 +2373,6 @@ svn_wc__db_temp_op_set_base_incomplete(s
                                        svn_boolean_t incomplete,
                                        apr_pool_t *scratch_pool);
 
-svn_error_t *
-svn_wc__db_temp_op_set_working_incomplete(svn_wc__db_t *db,
-                                          const char *local_dir_abspath,
-                                          svn_boolean_t incomplete,
-                                          apr_pool_t *scratch_pool);
-
-
-/* Set the pristine text checksum of the WORKING_NODE of LOCAL_ABSPATH in DB
-   to CHECKSUM. */
-svn_error_t *
-svn_wc__db_temp_op_set_working_checksum(svn_wc__db_t *db,
-                                        const char *local_abspath,
-                                        const svn_checksum_t *checksum,
-                                        apr_pool_t *scratch_pool);
-
 /* Update the BASE_NODE of directory LOCAL_ABSPATH to be NEW_REPOS_RELPATH
    at revision NEW_REV with status incomplete. */
 svn_error_t *
@@ -2379,6 +2429,73 @@ svn_wc__db_temp_op_set_file_external(svn
                                      const svn_opt_revision_t *rev,
                                      apr_pool_t *scratch_pool);
 
+/* Set the conflict marker information on LOCAL_ABSPATH to the specified
+   values */
+svn_error_t *
+svn_wc__db_temp_op_set_text_conflict_marker_files(svn_wc__db_t *db,
+                                                  const char *local_abspath,
+                                                  const char *old_basename,
+                                                  const char *new_basename,
+                                                  const char *wrk_basename,
+                                                  apr_pool_t *scratch_pool);
+
+/* Set the conflict marker information on LOCAL_ABSPATH to the specified
+   values */
+svn_error_t *
+svn_wc__db_temp_op_set_property_conflict_marker_file(svn_wc__db_t *db,
+                                                     const char *local_abspath,
+                                                     const char *prej_basename,
+                                                     apr_pool_t *scratch_pool);
+
+/* Ensure that the parent stub of LOCAL_ABSPATH contains a BASE_NODE record with
+   a normal status and optionally remove the WORKING_NODE record for the node;
+   this assumes that the parent directory is in the incomplete state, or the
+   node already exists (either as working or as base node). 
+
+   ### This function is a HACK with assumptions that aren't completely checked.
+   ### Don't add new callers unless you exactly know what 
+   ### you are doing! This call is never needed once we get to a central db. */
+svn_error_t *
+svn_wc__db_temp_set_parent_stub_to_normal(svn_wc__db_t *db,
+                                          const char *local_abspath,
+                                          svn_boolean_t delete_working,
+                                          apr_pool_t *scratch_pool);
+
+/* Sets a base nodes revision and/or repository relative path. If
+   LOCAL_ABSPATH's rev (REV) is valid, set is revision and if SET_REPOS_RELPATH
+   is TRUE set its repository relative path to REPOS_RELPATH (and make sure its
+   REPOS_ROOT_URL and REPOS_ROOT_UUID are still valid).
+ */
+svn_error_t *
+svn_wc__db_temp_op_set_rev_and_repos_relpath(svn_wc__db_t *db,
+                                             const char *local_abspath,
+                                             svn_revnum_t rev,
+                                             svn_boolean_t set_repos_relpath,
+                                             const char *repos_relpath,
+                                             const char *repos_root_url,
+                                             const char *repos_uuid,
+                                             svn_boolean_t update_stub,
+                                             apr_pool_t *scratch_pool);
+
+/* Tweak a locally added existing directory LOCAL_ABSPATH to have a base
+   node with incomplete status and revision REVISION instead. If
+   REPOS_RELPATH is not NULL, apply REPOS_RELPATH, REPOS_ROOT_URL and
+   REPOS_UUID.
+   Perform all temporary allocations in SCRATCH_POOL.
+   
+   ### For 1.7 this should probably become a proper tree conflict and
+   ### just handled by putting a base directory below the existing
+   ### working node.
+   */
+svn_error_t *
+svn_wc__db_temp_op_set_new_dir_to_incomplete(svn_wc__db_t *db,
+                                             const char *local_abspath,
+                                             const char *repos_relpath,
+                                             const char *repos_root_url,
+                                             const char *repos_uuid,
+                                             svn_revnum_t revision,
+                                             apr_pool_t *scratch_pool);
+
 /* @} */
 
 

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db_pdh.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db_pdh.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db_pdh.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db_pdh.c Tue Aug 10 22:07:24 2010
@@ -299,16 +299,30 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
         format);
     }
 
+  /* Verify that no work items exists. If they do, then our integrity is
+     suspect and, thus, we cannot use this database.  */
+  if (format >= SVN_WC__HAS_WORK_QUEUE
+      && (enforce_empty_wq || (format < SVN_WC__VERSION && auto_upgrade)))
+    {
+      svn_error_t *err = verify_no_work(sdb);
+      if (err)
+        {
+          /* Special message for attempts to upgrade a 1.7-dev wc with
+             outstanding workqueue items. */
+          if (err->apr_err == SVN_ERR_WC_CLEANUP_REQUIRED
+              && format < SVN_WC__VERSION && auto_upgrade)
+            err = svn_error_quick_wrap(err, _("Cleanup with an older 1.7 "
+                                              "client before upgrading with "
+                                              "this client"));
+          return svn_error_return(err);
+        }
+    }
+
   /* Auto-upgrade the SDB if possible.  */
   if (format < SVN_WC__VERSION && auto_upgrade)
     SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
                                 scratch_pool));
 
-  /* Verify that no work items exists. If they do, then our integrity is
-     suspect and, thus, we cannot use this database.  */
-  if (format >= SVN_WC__HAS_WORK_QUEUE && enforce_empty_wq)
-    SVN_ERR(verify_no_work(sdb));
-
   *wcroot = apr_palloc(result_pool, sizeof(**wcroot));
 
   (*wcroot)->abspath = wcroot_abspath;
@@ -423,7 +437,7 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
          For both of these cases, strip the basename off of the path and
          move up one level. Keep record of what we strip, though, since
          we'll need it later to construct local_relpath.  */
-      svn_dirent_split(local_abspath, &local_abspath, &build_relpath,
+      svn_dirent_split(&local_abspath, &build_relpath, local_abspath,
                        scratch_pool);
 
       /* ### if *pdh != NULL (from further above), then there is (quite

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c Tue Aug 10 22:07:24 2010
@@ -33,8 +33,6 @@
 #include "wc.h"
 #include "wc_db.h"
 #include "workqueue.h"
-#include "entries.h"
-#include "props.h"
 #include "adm_files.h"
 #include "translate.h"
 #include "log.h"
@@ -65,7 +63,9 @@
 #define OP_PREJ_INSTALL "prej-install"
 #define OP_WRITE_OLD_PROPS "write-old-props"
 #define OP_RECORD_FILEINFO "record-fileinfo"
-
+#define OP_TMP_SET_TEXT_CONFLICT_MARKERS "tmp-set-text-conflict-markers"
+#define OP_TMP_SET_PROPERTY_CONFLICT_MARKER "tmp-set-property-conflict-marker"
+#define OP_PRISTINE_GET_TRANSLATED "pristine-get-translated"
 
 /* For work queue debugging. Generates output about its operation.  */
 /* #define DEBUG_WORK_QUEUE */
@@ -212,12 +212,9 @@ run_revert(svn_wc__db_t *db,
   const char *local_abspath;
   svn_boolean_t replaced;
   svn_wc__db_kind_t kind;
-  svn_node_kind_t node_kind;
   const char *working_props_path;
   const char *parent_abspath;
   svn_boolean_t conflicted;
-  int modify_flags = 0;
-  svn_wc_entry_t tmp_entry;
 
   /* We need a NUL-terminated path, so copy it out of the skel.  */
   local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
@@ -294,10 +291,10 @@ run_revert(svn_wc__db_t *db,
 #else
           /* For WC-1: If there is a "revert base" file (because the file
            * is replaced), then move that revert base over to the normal
-           * base and update the normal base checksum accordingly. */
+           * base. WC-NG keeps the checksum which we used to recalculate
+           * in the past. */
           const char *revert_base_path;
           const char *text_base_path;
-          svn_checksum_t *checksum;
 
           SVN_ERR(svn_wc__text_revert_path(&revert_base_path, db,
                                            local_abspath, scratch_pool));
@@ -305,19 +302,6 @@ run_revert(svn_wc__db_t *db,
                                          scratch_pool));
           SVN_ERR(move_if_present(revert_base_path, text_base_path,
                                   scratch_pool));
-
-          /* At this point, the regular text base has been restored (just
-             now, or on a prior run). We need to recompute the checksum
-             from that.
-
-             ### in wc-1, this recompute only happened for add-with-history.
-             ### need to investigate, but maybe the checksum was not touched
-             ### for a simple replacing add? regardless, this recompute is
-             ### always okay to do.  */
-          SVN_ERR(svn_io_file_checksum2(&checksum, text_base_path,
-                                        svn_checksum_md5, scratch_pool));
-          tmp_entry.checksum = svn_checksum_to_cstring(checksum, scratch_pool);
-          modify_flags |= SVN_WC__ENTRY_MODIFY_CHECKSUM;
 #endif
         }
       else if (!reinstall_working)
@@ -417,62 +401,19 @@ run_revert(svn_wc__db_t *db,
                                           scratch_pool));
     }
 
-  /* Clean up the copied state for all replacements.  */
-  if (replaced)
-    {
-      modify_flags |= (SVN_WC__ENTRY_MODIFY_COPIED
-                       | SVN_WC__ENTRY_MODIFY_COPYFROM_URL
-                       | SVN_WC__ENTRY_MODIFY_COPYFROM_REV);
-      tmp_entry.copied = FALSE;
-      tmp_entry.copyfrom_url = NULL;
-      tmp_entry.copyfrom_rev = SVN_INVALID_REVNUM;
-    }
-
-  /* Reset schedule attribute to svn_wc_schedule_normal. It could already be
-     "normal", but no biggy if this is a no-op.  */
-  modify_flags |= SVN_WC__ENTRY_MODIFY_SCHEDULE;
-  tmp_entry.schedule = svn_wc_schedule_normal;
-
-  /* We need the old school KIND...  */
-  if (kind == svn_wc__db_kind_dir)
-    {
-      node_kind = svn_node_dir;
-    }
-  else
-    {
-      SVN_ERR_ASSERT(kind == svn_wc__db_kind_file
-                     || kind == svn_wc__db_kind_symlink);
-      node_kind = svn_node_file;
-    }
-
-  SVN_ERR(svn_wc__entry_modify(db, local_abspath, node_kind,
-                               &tmp_entry, modify_flags,
-                               scratch_pool));
+  {
+    svn_boolean_t is_wc_root;
 
-  /* ### need to revert some bits in the parent stub. sigh.  */
-  if (kind == svn_wc__db_kind_dir)
-    {
-      svn_boolean_t is_wc_root, is_switched;
+    SVN_ERR(svn_wc__check_wc_root(&is_wc_root, NULL, NULL,
+                                  db, local_abspath, scratch_pool));
 
-      /* There is no parent stub if we're at the root.  */
-      SVN_ERR(svn_wc__check_wc_root(&is_wc_root, NULL, &is_switched,
-                                    db, local_abspath, scratch_pool));
-      if (!is_wc_root && !is_switched)
-        {
-          tmp_entry.copied = FALSE;
-          tmp_entry.copyfrom_url = NULL;
-          tmp_entry.copyfrom_rev = SVN_INVALID_REVNUM;
-          tmp_entry.schedule = svn_wc_schedule_normal;
-          SVN_ERR(svn_wc__entry_modify_stub(
-                    db, local_abspath,
-                    &tmp_entry,
-                    SVN_WC__ENTRY_MODIFY_COPIED
-                      | SVN_WC__ENTRY_MODIFY_COPYFROM_URL
-                      | SVN_WC__ENTRY_MODIFY_COPYFROM_REV
-                      | SVN_WC__ENTRY_MODIFY_SCHEDULE,
-                    scratch_pool));
-        }
-    }
+    /* Remove the WORKING_NODE from the node and (if there) its parent stub */
+    /* ### A working copy root can't have a working node and trying
+       ### to delete it fails because the root doesn't have a stub. */
+    if (!is_wc_root)
+      SVN_ERR(svn_wc__db_temp_op_remove_working(db, local_abspath,
+                                                scratch_pool));
+  }
 
   return SVN_NO_ERROR;
 }
@@ -980,19 +921,19 @@ run_deletion_postcommit(svn_wc__db_t *db
       if (kind == svn_wc__db_kind_dir)
         {
           svn_boolean_t keep_local;
-          svn_wc_entry_t tmp_entry;
 
           /* Bump the revision number of this_dir anyway, so that it
              might be higher than its parent's revnum.  If it's
              higher, then the process that sees KILLME and destroys
              the directory can also place a 'deleted' dir entry in the
              parent. */
-          tmp_entry.revision = new_revision;
-          SVN_ERR(svn_wc__entry_modify(db, local_abspath,
-                                       svn_node_dir,
-                                       &tmp_entry,
-                                       SVN_WC__ENTRY_MODIFY_REVISION,
-                                       scratch_pool));
+          SVN_ERR(svn_wc__db_temp_op_set_rev_and_repos_relpath(db,
+                                                               local_abspath,
+                                                               new_revision,
+                                                               FALSE,
+                                                               NULL, NULL,
+                                                               NULL, FALSE,
+                                                               scratch_pool));
 
           SVN_ERR(svn_wc__db_temp_determine_keep_local(&keep_local, db,
                                                        local_abspath,
@@ -1256,6 +1197,7 @@ log_do_committed(svn_wc__db_t *db,
                  const svn_checksum_t *new_checksum,
                  apr_hash_t *new_dav_cache,
                  svn_boolean_t keep_changelist,
+                 svn_boolean_t no_unlock,
                  svn_cancel_func_t cancel_func,
                  void *cancel_baton,
                  apr_pool_t *scratch_pool)
@@ -1400,7 +1342,8 @@ log_do_committed(svn_wc__db_t *db,
     }
 
   /* If it's a file, install the tree changes and the file's text. */
-  if (kind == svn_wc__db_kind_file)
+  if (kind == svn_wc__db_kind_file
+      || kind == svn_wc__db_kind_symlink)
     {
       svn_boolean_t overwrote_working;
       apr_finfo_t finfo;
@@ -1413,6 +1356,7 @@ log_do_committed(svn_wc__db_t *db,
                                        NULL /* new_children */,
                                        new_dav_cache,
                                        keep_changelist,
+                                       no_unlock,
                                        NULL /* work_items */,
                                        pool));
 
@@ -1496,6 +1440,7 @@ log_do_committed(svn_wc__db_t *db,
                                    NULL /* new_children */,
                                    new_dav_cache,
                                    keep_changelist,
+                                   no_unlock,
                                    NULL /* work_items */,
                                    pool));
 
@@ -1514,24 +1459,8 @@ log_do_committed(svn_wc__db_t *db,
   }
 
   /* Make sure we have a parent stub in a clean/unmodified state.  */
-  {
-    svn_wc_entry_t tmp_entry;
-
-    tmp_entry.schedule = svn_wc_schedule_normal;
-    tmp_entry.copied = FALSE;
-    tmp_entry.deleted = FALSE;
-    /* ### We assume we have the right lock to modify the parent record.
-
-           If this fails for you in the transition to one DB phase, please
-           run svn cleanup one level higher. */
-    SVN_ERR(svn_wc__entry_modify_stub(db, local_abspath,
-                                      &tmp_entry,
-                                      (SVN_WC__ENTRY_MODIFY_SCHEDULE
-                                       | SVN_WC__ENTRY_MODIFY_COPIED
-                                       | SVN_WC__ENTRY_MODIFY_DELETED
-                                       | SVN_WC__ENTRY_MODIFY_FORCE),
-                                      pool));
-  }
+  SVN_ERR(svn_wc__db_temp_set_parent_stub_to_normal(db, local_abspath,
+                                                    TRUE, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1555,7 +1484,7 @@ run_postcommit(svn_wc__db_t *db,
   const char *new_author;
   const svn_checksum_t *new_checksum;
   apr_hash_t *new_dav_cache;
-  svn_boolean_t keep_changelist;
+  svn_boolean_t keep_changelist, no_unlock;
   const char *tmp_text_base_abspath;
   svn_error_t *err;
 
@@ -1595,10 +1524,16 @@ run_postcommit(svn_wc__db_t *db,
                                            arg5->next->next->next->data,
                                            arg5->next->next->next->len);
 
+  if (arg5->next->next->next->next)
+    no_unlock = svn_skel__parse_int(arg5->next->next->next->next,
+                                     scratch_pool) != 0;
+  else
+    no_unlock = TRUE;
+
   err = log_do_committed(db, local_abspath, tmp_text_base_abspath,
                          new_revision, new_date,
                          new_author, new_checksum, new_dav_cache,
-                         keep_changelist,
+                         keep_changelist, no_unlock,
                          cancel_func, cancel_baton,
                          scratch_pool);
   if (err)
@@ -1621,10 +1556,12 @@ svn_wc__wq_add_postcommit(svn_wc__db_t *
                           const svn_checksum_t *new_checksum,
                           apr_hash_t *new_dav_cache,
                           svn_boolean_t keep_changelist,
+                          svn_boolean_t no_unlock,
                           apr_pool_t *scratch_pool)
 {
   svn_skel_t *work_item = svn_skel__make_empty_list(scratch_pool);
 
+  svn_skel__prepend_int(no_unlock, work_item, scratch_pool);
   svn_skel__prepend_str(tmp_text_base_abspath ? tmp_text_base_abspath : "",
                         work_item, scratch_pool);
   svn_skel__prepend_int(keep_changelist, work_item, scratch_pool);
@@ -2309,6 +2246,214 @@ svn_wc__wq_build_record_fileinfo(svn_ske
   return SVN_NO_ERROR;
 }
 
+/* ------------------------------------------------------------------------ */
+
+/* OP_TMP_SET_TEXT_CONFLICT_MARKERS  */
+
+
+static svn_error_t *
+run_set_text_conflict_markers(svn_wc__db_t *db,
+                    const svn_skel_t *work_item,
+                    svn_cancel_func_t cancel_func,
+                    void *cancel_baton,
+                    apr_pool_t *scratch_pool)
+{
+  const svn_skel_t *arg = work_item->children->next;
+  const char *local_abspath;
+  const char *old_basename;
+  const char *new_basename;
+  const char *wrk_basename;
+
+  local_abspath = apr_pstrmemdup(scratch_pool, arg->data, arg->len);
+
+  arg = arg->next;
+  old_basename = arg->len ? apr_pstrmemdup(scratch_pool, arg->data, arg->len)
+                          : NULL;
+
+  arg = arg->next;
+  new_basename = arg->len ? apr_pstrmemdup(scratch_pool, arg->data, arg->len)
+                          : NULL;
+
+  arg = arg->next;
+  wrk_basename = arg->len ? apr_pstrmemdup(scratch_pool, arg->data, arg->len)
+                          : NULL;
+
+  return svn_error_return(
+          svn_wc__db_temp_op_set_text_conflict_marker_files(db,
+                                                            local_abspath,
+                                                            old_basename,
+                                                            new_basename,
+                                                            wrk_basename,
+                                                            scratch_pool));
+}
+
+
+svn_error_t *
+svn_wc__wq_tmp_build_set_text_conflict_markers(svn_skel_t **work_item,
+                                               svn_wc__db_t *db,
+                                               const char *local_abspath,
+                                               const char *old_basename,
+                                               const char *new_basename,
+                                               const char *wrk_basename,
+                                               apr_pool_t *result_pool,
+                                               apr_pool_t *scratch_pool)
+{
+  *work_item = svn_skel__make_empty_list(result_pool);
+
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+  svn_skel__prepend_str(wrk_basename ? apr_pstrdup(result_pool, wrk_basename)
+                                     : "", *work_item, result_pool);
+
+  svn_skel__prepend_str(new_basename ? apr_pstrdup(result_pool, new_basename)
+                                     : "", *work_item, result_pool);
+
+  svn_skel__prepend_str(old_basename ? apr_pstrdup(result_pool, old_basename)
+                                     : "", *work_item, result_pool);
+
+  svn_skel__prepend_str(apr_pstrdup(result_pool, local_abspath),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(OP_TMP_SET_TEXT_CONFLICT_MARKERS, *work_item,
+                        result_pool);
+
+  return SVN_NO_ERROR;
+}
+
+/* ------------------------------------------------------------------------ */
+
+/* OP_TMP_SET_PROPERTY_CONFLICT_MARKER  */
+
+static svn_error_t *
+run_set_property_conflict_marker(svn_wc__db_t *db,
+                                 const svn_skel_t *work_item,
+                                 svn_cancel_func_t cancel_func,
+                                 void *cancel_baton,
+                                 apr_pool_t *scratch_pool)
+{
+  const svn_skel_t *arg = work_item->children->next;
+  const char *local_abspath;
+  const char *prej_basename;
+
+  local_abspath = apr_pstrmemdup(scratch_pool, arg->data, arg->len);
+
+  arg = arg->next;
+  prej_basename = arg->len ? apr_pstrmemdup(scratch_pool, arg->data, arg->len)
+                           : NULL;
+
+  return svn_error_return(
+          svn_wc__db_temp_op_set_property_conflict_marker_file(db,
+                                                                local_abspath,
+                                                                prej_basename,
+                                                                scratch_pool));
+}
+
+svn_error_t *
+svn_wc__wq_tmp_build_set_property_conflict_marker(svn_skel_t **work_item,
+                                                  svn_wc__db_t *db,
+                                                  const char *local_abspath,
+                                                  const char *prej_basename,
+                                                  apr_pool_t *result_pool,
+                                                  apr_pool_t *scratch_pool)
+{
+  *work_item = svn_skel__make_empty_list(result_pool);
+
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+  svn_skel__prepend_str(prej_basename ? apr_pstrdup(result_pool, prej_basename)
+                                      : "", *work_item, result_pool);
+
+  svn_skel__prepend_str(apr_pstrdup(result_pool, local_abspath),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(OP_TMP_SET_PROPERTY_CONFLICT_MARKER, *work_item,
+                        result_pool);
+
+  return SVN_NO_ERROR;
+}
+
+/* ------------------------------------------------------------------------ */
+
+/* OP_PRISTINE_GET_TRANSLATED  */
+
+/* Create (or overwrite) the file NEW_ABSPATH with the pristine text
+   identified by PRISTINE_SHA1, translated into working-copy form
+   according to the versioned properties of VERSIONED_ABSPATH. */
+static svn_error_t *
+pristine_get_translated(svn_wc__db_t *db,
+                        const char *versioned_abspath,
+                        const char *new_abspath,
+                        const svn_checksum_t *pristine_sha1,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
+                        apr_pool_t *scratch_pool)
+{
+  svn_stream_t *src_stream, *dst_stream;
+
+  SVN_ERR(svn_wc__db_pristine_read(&src_stream, db, versioned_abspath,
+                                   pristine_sha1,
+                                   scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__internal_translated_stream(&dst_stream, db, new_abspath,
+                                             versioned_abspath,
+                                             SVN_WC_TRANSLATE_FROM_NF,
+                                             scratch_pool, scratch_pool));
+  SVN_ERR(svn_stream_copy3(src_stream, dst_stream,
+                           cancel_func, cancel_baton, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+run_pristine_get_translated(svn_wc__db_t *db,
+                            const svn_skel_t *work_item,
+                            svn_cancel_func_t cancel_func,
+                            void *cancel_baton,
+                            apr_pool_t *scratch_pool)
+{
+  const svn_skel_t *arg1 = work_item->children->next;
+  const char *versioned_abspath;
+  const char *new_abspath;
+  const svn_checksum_t *pristine_sha1;
+
+  versioned_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+  new_abspath = apr_pstrmemdup(scratch_pool, arg1->next->data,
+                               arg1->next->len);
+  {
+    const char *data = apr_pstrmemdup(scratch_pool,
+                                      arg1->next->next->data,
+                                      arg1->next->next->len);
+    SVN_ERR(svn_checksum_deserialize(&pristine_sha1, data,
+                                     scratch_pool, scratch_pool));
+  }
+
+  SVN_ERR(pristine_get_translated(db, versioned_abspath, new_abspath,
+                                  pristine_sha1,
+                                  cancel_func, cancel_baton, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__wq_build_pristine_get_translated(svn_skel_t **work_item,
+                                         svn_wc__db_t *db,
+                                         const char *versioned_abspath,
+                                         const char *new_abspath,
+                                         const svn_checksum_t *pristine_sha1,
+                                         apr_pool_t *result_pool,
+                                         apr_pool_t *scratch_pool)
+{
+  *work_item = svn_skel__make_empty_list(result_pool);
+
+  svn_skel__prepend_str(svn_checksum_serialize(pristine_sha1,
+                                               result_pool, scratch_pool),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(apr_pstrdup(result_pool, new_abspath),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(apr_pstrdup(result_pool, versioned_abspath),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(OP_PRISTINE_GET_TRANSLATED, *work_item, result_pool);
+
+  return SVN_NO_ERROR;
+}
+
 
 /* ------------------------------------------------------------------------ */
 
@@ -2326,6 +2471,9 @@ static const struct work_item_dispatch d
   { OP_PREJ_INSTALL, run_prej_install },
   { OP_WRITE_OLD_PROPS, run_write_old_props },
   { OP_RECORD_FILEINFO, run_record_fileinfo },
+  { OP_TMP_SET_TEXT_CONFLICT_MARKERS, run_set_text_conflict_markers },
+  { OP_TMP_SET_PROPERTY_CONFLICT_MARKER, run_set_property_conflict_marker },
+  { OP_PRISTINE_GET_TRANSLATED, run_pristine_get_translated },
 
 /* See props.h  */
 #ifdef SVN__SUPPORT_BASE_MERGE

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h Tue Aug 10 22:07:24 2010
@@ -214,6 +214,60 @@ svn_wc__wq_build_loggy(svn_skel_t **work
                        apr_pool_t *result_pool);
 
 
+/* ### Temporary helper to store text conflict marker locations as a wq
+   ### operation. Eventually the data must be stored in the pristine store+db
+   ### before the wq runs (within the operation transaction) and then a wq
+   ### operation will create the markers.
+
+   Set *WORK_ITEM to a new work item that sets the conflict marker values
+   on ACTUAL_NODE to the passed values or to NULL if NULL is passed.
+
+   Allocate the result in RESULT_POOL and perform temporary allocations
+   in SCRATCH_POOL
+*/
+svn_error_t *
+svn_wc__wq_tmp_build_set_text_conflict_markers(svn_skel_t **work_item,
+                                               svn_wc__db_t *db,
+                                               const char *local_abspath,
+                                               const char *old_basename,
+                                               const char *new_basename,
+                                               const char *wrk_basename,
+                                               apr_pool_t *result_pool,
+                                               apr_pool_t *scratch_pool);
+
+/* ### Temporary helper to store the property conflict marker location as a wq
+   ### operation. Eventually the data must be stored in the pristine store+db
+   ### before the wq runs (within the operation transaction) and then a wq
+   ### operation will create the marker.
+
+   Set *WORK_ITEM to a new work item that sets the conflict marker values
+   on ACTUAL_NODE to the passed values or to NULL if NULL is passed.
+
+   Allocate the result in RESULT_POOL and perform temporary allocations
+   in SCRATCH_POOL
+*/
+svn_error_t *
+svn_wc__wq_tmp_build_set_property_conflict_marker(svn_skel_t **work_item,
+                                                  svn_wc__db_t *db,
+                                                  const char *local_abspath,
+                                                  const char *prej_basename,
+                                                  apr_pool_t *result_pool,
+                                                  apr_pool_t *scratch_pool);
+
+/* Set *WORK_ITEM to a new work item that will create the file NEW_ABSPATH
+ * with the pristine text identified by PRISTINE_SHA1, translated into
+ * working-copy form according to the versioned properties of
+ * VERSIONED_ABSPATH that are current when the work item is executed.  The
+ * work item will overwrite NEW_ABSPATH if that already exists. */
+svn_error_t *
+svn_wc__wq_build_pristine_get_translated(svn_skel_t **work_item,
+                                         svn_wc__db_t *db,
+                                         const char *versioned_abspath,
+                                         const char *new_abspath,
+                                         const svn_checksum_t *pristine_sha1,
+                                         apr_pool_t *result_pool,
+                                         apr_pool_t *scratch_pool);
+
 svn_error_t *
 svn_wc__wq_add_deletion_postcommit(svn_wc__db_t *db,
                                    const char *local_abspath,
@@ -232,6 +286,7 @@ svn_wc__wq_add_postcommit(svn_wc__db_t *
                           const svn_checksum_t *new_checksum,
                           apr_hash_t *new_dav_cache,
                           svn_boolean_t keep_changelist,
+                          svn_boolean_t no_unlock,
                           apr_pool_t *scratch_pool);
 
 

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c Tue Aug 10 22:07:24 2010
@@ -186,6 +186,8 @@ dav_svn__get_locks_report(const dav_reso
   apr_status_t apr_err;
   apr_hash_t *locks;
   dav_svn__authz_read_baton arb;
+  svn_depth_t depth = svn_depth_unknown;
+  apr_xml_attr *this_attr;
 
   /* The request URI should be a public one representing an fs path. */
   if ((! resource->info->repos_path)
@@ -197,12 +199,33 @@ dav_svn__get_locks_report(const dav_reso
   arb.r = resource->info->r;
   arb.repos = resource->info->repos;
 
+  /* See if the client provided additional information for this request. */
+  for (this_attr = doc->root->attr; this_attr; this_attr = this_attr->next)
+    {
+      if (strcmp(this_attr->name, "depth") == 0)
+        {
+          depth = svn_depth_from_word(this_attr->value);
+          if ((depth != svn_depth_empty) &&
+              (depth != svn_depth_files) &&
+              (depth != svn_depth_immediates) &&
+              (depth != svn_depth_infinity))
+            return dav_new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+                                 "Invalid 'depth' specified in "
+                                 "get-locks-report request.");
+          continue;
+        }
+    }
+
+  /* For compatibility, our default depth is infinity. */
+  if (depth == svn_depth_unknown)
+    depth = svn_depth_infinity;
+
   /* Fetch the locks, but allow authz_read checks to happen on each. */
-  if ((err = svn_repos_fs_get_locks(&locks,
-                                    resource->info->repos->repos,
-                                    resource->info->repos_path,
-                                    dav_svn__authz_read_func(&arb), &arb,
-                                    resource->pool)) != SVN_NO_ERROR)
+  if ((err = svn_repos_fs_get_locks2(&locks,
+                                     resource->info->repos->repos,
+                                     resource->info->repos_path, depth,
+                                     dav_svn__authz_read_func(&arb), &arb,
+                                     resource->pool)) != SVN_NO_ERROR)
     return dav_svn__convert_err(err, HTTP_INTERNAL_SERVER_ERROR,
                                 err->message, resource->pool);
 

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c Tue Aug 10 22:07:24 2010
@@ -2293,19 +2293,17 @@ static const char *
 get_parent_path(const char *path, apr_pool_t *pool)
 {
   apr_size_t len;
-  const char *parentpath, *base_name;
   char *tmp = apr_pstrdup(pool, path);
 
   len = strlen(tmp);
 
   if (len > 0)
     {
-      /* Remove any trailing slash; else svn_uri_split() asserts. */
+      /* Remove any trailing slash; else svn_uri_dirname() asserts. */
       if (tmp[len-1] == '/')
         tmp[len-1] = '\0';
-      svn_uri_split(tmp, &parentpath, &base_name, pool);
 
-      return parentpath;
+      return svn_uri_dirname(tmp, pool);
     }
 
   return path;

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/add-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/add-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/add-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/add-cmd.c Tue Aug 10 22:07:24 2010
@@ -64,7 +64,7 @@ svn_cl__add(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_infinity;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   subpool = svn_pool_create(pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/blame-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/blame-cmd.c Tue Aug 10 22:07:24 2010
@@ -51,6 +51,8 @@ typedef struct
    XML to stdout. */
 static svn_error_t *
 blame_receiver_xml(void *baton,
+                   svn_revnum_t start_revnum,
+                   svn_revnum_t end_revnum,
                    apr_int64_t line_no,
                    svn_revnum_t revision,
                    apr_hash_t *rev_props,
@@ -117,13 +119,26 @@ print_line_info(svn_stream_t *out,
                 const char *date,
                 const char *path,
                 svn_boolean_t verbose,
+                svn_revnum_t end_revnum,
                 apr_pool_t *pool)
 {
   const char *time_utf8;
   const char *time_stdout;
-  const char *rev_str = SVN_IS_VALID_REVNUM(revision)
-    ? apr_psprintf(pool, "%6ld", revision)
-                        : "     -";
+  const char *rev_str;
+  int rev_maxlength;
+
+  /* The standard column width for the revision number is 6 characters.
+     If the revision number can potentially be larger (i.e. if the end_revnum
+     is larger than 1000000), we increase the column width as needed. */
+  rev_maxlength = 6;
+  while (end_revnum >= 1000000)
+    {
+      rev_maxlength++;
+      end_revnum = end_revnum / 10;
+    }
+  rev_str = SVN_IS_VALID_REVNUM(revision)
+    ? apr_psprintf(pool, "%*ld", rev_maxlength, revision)
+    : apr_psprintf(pool, "%*s", rev_maxlength, "-");
 
   if (verbose)
     {
@@ -152,7 +167,7 @@ print_line_info(svn_stream_t *out,
     }
   else
     {
-      return svn_stream_printf(out, pool, "%s %10s ", rev_str,
+      return svn_stream_printf(out, pool, "%s %10.10s ", rev_str,
                                author ? author : "         -");
     }
 
@@ -162,6 +177,8 @@ print_line_info(svn_stream_t *out,
 /* This implements the svn_client_blame_receiver3_t interface. */
 static svn_error_t *
 blame_receiver(void *baton,
+               svn_revnum_t start_revnum,
+               svn_revnum_t end_revnum,
                apr_int64_t line_no,
                svn_revnum_t revision,
                apr_hash_t *rev_props,
@@ -199,14 +216,16 @@ blame_receiver(void *baton,
                                                SVN_PROP_REVISION_AUTHOR),
                             svn_prop_get_value(merged_rev_props,
                                                SVN_PROP_REVISION_DATE),
-                            merged_path, opt_state->verbose, pool));
+                            merged_path, opt_state->verbose, end_revnum,
+                            pool));
   else
     SVN_ERR(print_line_info(out, revision,
                             svn_prop_get_value(rev_props,
                                                SVN_PROP_REVISION_AUTHOR),
                             svn_prop_get_value(rev_props,
                                                SVN_PROP_REVISION_DATE),
-                            NULL, opt_state->verbose, pool));
+                            NULL, opt_state->verbose, end_revnum,
+                            pool));
 
   return svn_stream_printf(out, pool, "%s%s", line, APR_EOL_STR);
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/changelist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/changelist-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/changelist-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/changelist-cmd.c Tue Aug 10 22:07:24 2010
@@ -97,7 +97,7 @@ svn_cl__changelist(apr_getopt_t *os,
   if (depth == svn_depth_unknown)
     depth = svn_depth_empty;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   if (changelist_name)
     {

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/cl.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/cl.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/cl.h Tue Aug 10 22:07:24 2010
@@ -228,6 +228,7 @@ typedef struct svn_cl__opt_state_t
                                       patching */
   svn_boolean_t show_diff;        /* produce diff output */
   svn_boolean_t internal_diff;    /* override diff_cmd in config file */
+  svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
   svn_boolean_t ignore_mergeinfo; /* ignore mergeinfo in reporting commands. */
 } svn_cl__opt_state_t;
 
@@ -391,7 +392,7 @@ svn_cl__time_cstring_to_human_cstring(co
    */
 svn_error_t *
 svn_cl__print_status(const char *path,
-                     const svn_wc_status3_t *status,
+                     const svn_client_status_t *status,
                      svn_boolean_t detailed,
                      svn_boolean_t show_last_committed,
                      svn_boolean_t skip_unrecognized,
@@ -407,7 +408,7 @@ svn_cl__print_status(const char *path,
    allocations. */
 svn_error_t *
 svn_cl__print_status_xml(const char *path,
-                         const svn_wc_status3_t *status,
+                         const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,
                          apr_pool_t *pool);
 
@@ -737,6 +738,50 @@ svn_cl__path_join(const char *base,
                   const char *component,
                   apr_pool_t *pool);
 
+/* Return, in @a *true_targets_p, a copy of @a targets with peg revision
+ * specifiers snipped off the end of each element.
+ *
+ * ### JAF TODO: This function is not good because it does not allow the
+ * ### caller to detect if an invalid peg revision was specified.
+ * ###
+ * ### Callers should never have a need to silently *discard* all peg
+ * ### revisions, even if they are doing this *after* saving any peg
+ * ### revisions that might be of interest on certain arguments: I don't
+ * ### think it can ever be correct to silently ignore a peg revision that
+ * ### is specified, whether it makes semantic sense or not.
+ * ###
+ * ### Instead, callers should parse all the arguments and silently
+ * ### ignore an *empty* peg revision part (just an "@", which can be
+ * ### used to escape an earlier "@" in the argument) on any argument,
+ * ### even an argument on which a peg revision does not make sense,
+ * ### but should not silently ignore a non-empty peg when it does not
+ * ### make sense.
+ * ###
+ * ### Something like:
+ * ###   For each (URL-like?) argument that doesn't accept a peg rev:
+ * ###     Parse into peg-rev and true-path parts;
+ * ###     If (peg rev != unspecified)
+ * ###       Error("This arg doesn't accept a peg rev.").
+ * ###     Use the true-path part.
+ *
+ * This function is useful for subcommands for which peg revisions
+ * do not make any sense. Such subcommands still need to allow peg
+ * revisions to be specified on the command line so that users of
+ * the command line client can consistently escape '@' characters
+ * in filenames by appending an '@' character, regardless of the
+ * subcommand being used.
+ *
+ * If a peg revision is present but cannot be parsed, an error is thrown.
+ * The user has likely forgotten to escape an '@' character in a filename.
+ *
+ * It is safe to pass the address of @a targets as @a true_targets_p.
+ *
+ * Do all allocations in @a pool. */
+svn_error_t *
+svn_cl__eat_peg_revisions(apr_array_header_t **true_targets_p,
+                          const apr_array_header_t *targets,
+                          apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/cleanup-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/cleanup-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/cleanup-cmd.c Tue Aug 10 22:07:24 2010
@@ -55,7 +55,7 @@ svn_cl__cleanup(apr_getopt_t *os,
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, pool);
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   subpool = svn_pool_create(pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/commit-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/commit-cmd.c Tue Aug 10 22:07:24 2010
@@ -74,7 +74,7 @@ svn_cl__commit(apr_getopt_t *os,
   /* Add "." if user passed 0 arguments. */
   svn_opt_push_implicit_dot_target(targets, pool);
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   /* Condense the targets (like commit does)... */
   SVN_ERR(svn_path_condense_targets(&base_dir,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/copy-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/copy-cmd.c Tue Aug 10 22:07:24 2010
@@ -77,6 +77,8 @@ svn_cl__copy(apr_getopt_t *os,
       APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = source;
     }
 
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
+
   /* Figure out which type of trace editor to use.
      If the src_paths are not homogeneous, setup_copy will return an error. */
   src_path = APR_ARRAY_IDX(targets, 0, const char *);

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/delete-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/delete-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/delete-cmd.c Tue Aug 10 22:07:24 2010
@@ -77,7 +77,7 @@ svn_cl__delete(apr_getopt_t *os,
                                          NULL, ctx->config, pool));
     }
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_delete3(&commit_info, targets, opt_state->force,
                            opt_state->keep_local, opt_state->revprop_table,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/diff-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/diff-cmd.c Tue Aug 10 22:07:24 2010
@@ -161,11 +161,10 @@ svn_cl__diff(apr_getopt_t *os,
   const svn_client_diff_summarize_func_t summarize_func =
     (opt_state->xml ? summarize_xml : summarize_regular);
 
-  /* Fall back to "" to get options initialized either way. */
-  {
-    const char *optstr = opt_state->extensions ? opt_state->extensions : "";
-    options = svn_cstring_split(optstr, " \t\n\r", TRUE, pool);
-  }
+  if (opt_state->extensions)
+    options = svn_cstring_split(opt_state->extensions, " \t\n\r", TRUE, pool);
+  else
+    options = NULL;
 
   /* Get an apr_file_t representing stdout and stderr, which is where
      we'll have the external 'diff' program print to. */
@@ -351,6 +350,7 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->no_diff_deleted,
                      opt_state->show_copies_as_adds,
                      opt_state->force,
+                     opt_state->use_git_diff_format,
                      opt_state->ignore_mergeinfo,
                      svn_cmdline_output_encoding(pool),
                      outfile,
@@ -397,6 +397,7 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->no_diff_deleted,
                      opt_state->show_copies_as_adds,
                      opt_state->force,
+                     opt_state->use_git_diff_format,
                      opt_state->ignore_mergeinfo,
                      svn_cmdline_output_encoding(pool),
                      outfile,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/lock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/lock-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/lock-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/lock-cmd.c Tue Aug 10 22:07:24 2010
@@ -104,7 +104,7 @@ svn_cl__lock(apr_getopt_t *os,
   SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, FALSE,
                                FALSE, FALSE, pool));
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   return svn_client_lock(targets, comment, opt_state->force, ctx, pool);
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/log-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/log-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/log-cmd.c Tue Aug 10 22:07:24 2010
@@ -282,10 +282,11 @@ log_entry_receiver(void *baton,
         return svn_error_wrap_apr(status, _("Can't open stderr"));
 
       /* Fall back to "" to get options initialized either way. */
-      {
-        const char *optstr = lb->diff_extensions ? lb->diff_extensions : "";
-        diff_options = svn_cstring_split(optstr, " \t\n\r", TRUE, pool);
-      }
+      if (lb->diff_extensions)
+        diff_options = svn_cstring_split(lb->diff_extensions, " \t\n\r", 
+                                         TRUE, pool);
+      else
+        diff_options = NULL;
 
       start_revision.kind = svn_opt_revision_number;
       start_revision.value.number = log_entry->revision - 1;
@@ -304,6 +305,7 @@ log_entry_receiver(void *baton,
                              TRUE, /* no diff deleted */
                              FALSE, /* show copies as adds */
                              FALSE, /* ignore content type */
+                             FALSE, /* use git diff format */
                              FALSE, /* ignore mergeinfo */
                              svn_cmdline_output_encoding(pool),
                              outfile,
@@ -337,6 +339,7 @@ log_entry_receiver(void *baton,
                                          TRUE, /* no diff deleted */
                                          FALSE, /* show copies as adds */
                                          FALSE, /* ignore content type */
+                                         FALSE, /* use git diff format */
                                          FALSE, /* ignore mergeinfo */
                                          svn_cmdline_output_encoding(iterpool),
                                          outfile,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/main.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/main.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/main.c Tue Aug 10 22:07:24 2010
@@ -121,6 +121,7 @@ typedef enum {
   opt_ignore_whitespace,
   opt_show_diff,
   opt_internal_diff,
+  opt_use_git_diff_format,
   opt_ignore_mergeinfo
 } svn_cl__longopt_t;
 
@@ -368,6 +369,8 @@ const apr_getopt_option_t svn_cl__option
                        N_("override diff-cmd specified in config file\n"
                        "                             "
                        "[alias: --idiff]")},
+  {"git-diff", opt_use_git_diff_format, 0,
+                       N_("use git's extended diff format\n")},
   {"ignore-mergeinfo",  opt_ignore_mergeinfo, 0,
                     N_("ignore changes to mergeinfo")},
 
@@ -576,7 +579,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {'r', 'c', opt_old_cmd, opt_new_cmd, 'N', opt_depth, opt_diff_cmd,
      opt_internal_diff, 'x', opt_no_diff_deleted, opt_show_copies_as_adds,
      opt_notice_ancestry, opt_ignore_mergeinfo, opt_summarize, opt_changelist,
-     opt_force, opt_xml} },
+     opt_force, opt_xml, opt_use_git_diff_format} },
   { "export", svn_cl__export, {0}, N_
     ("Create an unversioned copy of a tree.\n"
      "usage: 1. export [-r REV] URL[@PEGREV] [PATH]\n"
@@ -1051,11 +1054,17 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "      ' ' the working copy is up to date\n"
      "\n"
      "  Remaining fields are variable width and delimited by spaces:\n"
-     "    The working revision (with -u or -v)\n"
+     "    The working revision (with -u or -v; '-' if the item is copied)\n"
      "    The last committed revision and last committed author (with -v)\n"
      "    The working copy path is always the final field, so it can\n"
      "      include spaces.\n"
      "\n"
+     "  The presence of a question mark ('?') where a working revision, last\n"
+     "  committed revision, or last committed author was expected indicates\n"
+     "  that the information is unknown or irrelevant given the state of the\n"
+     "  item (for example, when the item is the result of a copy operation).\n"
+     "  The question mark serves as a visual placeholder to facilitate parsing.\n"
+     "\n"
      "  Example output:\n"
      "    svn status wc\n"
      "     M     wc/bar.c\n"
@@ -1064,13 +1073,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    svn status -u wc\n"
      "     M           965    wc/bar.c\n"
      "           *     965    wc/foo.c\n"
-     "    A  +         965    wc/qax.c\n"
+     "    A  +           -    wc/qax.c\n"
      "    Status against revision:   981\n"
      "\n"
      "    svn status --show-updates --verbose wc\n"
      "     M           965       938 kfogel       wc/bar.c\n"
      "           *     965       922 sussman      wc/foo.c\n"
-     "    A  +         965       687 joe          wc/qax.c\n"
+     "    A  +           -       687 joe          wc/qax.c\n"
      "                 965       687 joe          wc/zig.c\n"
      "    Status against revision:   981\n"
      "\n"
@@ -1769,6 +1778,8 @@ main(int argc, const char *argv[])
       case opt_internal_diff:
         opt_state.internal_diff = TRUE;
         break;
+      case opt_use_git_diff_format:
+        opt_state.use_git_diff_format = TRUE;
       case opt_ignore_mergeinfo:
         opt_state.ignore_mergeinfo = TRUE;
         break;

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/merge-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/merge-cmd.c Tue Aug 10 22:07:24 2010
@@ -280,6 +280,25 @@ svn_cl__merge(apr_getopt_t *os,
   else
     options = NULL;
 
+  /* More input validation. */
+  if (opt_state->reintegrate)
+    {
+      if (opt_state->depth != svn_depth_unknown)
+        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                _("--depth cannot be used with "
+                                  "--reintegrate"));
+
+      if (opt_state->force)
+        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                _("--force cannot be used with "
+                                  "--reintegrate"));
+
+      if (two_sources_specified)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--reintegrate can only be used with "
+                                  "a single merge source"));
+    }
+
   if (! two_sources_specified) /* TODO: Switch order of if */
     {
       /* If we don't have a source, use the target as the source. */
@@ -301,23 +320,11 @@ svn_cl__merge(apr_getopt_t *os,
         }
 
       if (opt_state->reintegrate)
-        {
-          if (opt_state->depth != svn_depth_unknown)
-            return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                    _("--depth cannot be used with "
-                                      "--reintegrate"));
-
-          if (opt_state->force)
-            return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                    _("--force cannot be used with "
-                                      "--reintegrate"));
-
-          err = svn_client_merge_reintegrate(sourcepath1,
-                                             &peg_revision1,
-                                             targetpath,
-                                             opt_state->dry_run,
-                                             options, ctx, pool);
-        }
+        err = svn_client_merge_reintegrate(sourcepath1,
+                                           &peg_revision1,
+                                           targetpath,
+                                           opt_state->dry_run,
+                                           options, ctx, pool);
       else
         err = svn_client_merge_peg3(sourcepath1,
                                     ranges_to_merge,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/mkdir-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/mkdir-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/mkdir-cmd.c Tue Aug 10 22:07:24 2010
@@ -78,7 +78,7 @@ svn_cl__mkdir(apr_getopt_t *os,
                                          NULL, ctx->config, pool));
     }
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_mkdir3(&commit_info, targets, opt_state->parents,
                           opt_state->revprop_table, ctx, pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/move-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/move-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/move-cmd.c Tue Aug 10 22:07:24 2010
@@ -87,7 +87,7 @@ svn_cl__move(apr_getopt_t *os,
     SVN_ERR(svn_cl__make_log_msg_baton(&(ctx->log_msg_baton3), opt_state,
                                        NULL, ctx->config, pool));
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_move5(&commit_info, targets, dst_path, opt_state->force,
                          TRUE, opt_state->parents, opt_state->revprop_table,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/notify.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/notify.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/notify.c Tue Aug 10 22:07:24 2010
@@ -613,24 +613,19 @@ notify(void *baton, const svn_wc_notify_
       break;
 
     case svn_wc_notify_changelist_set:
-      if ((err = svn_cmdline_printf(pool, _("Path '%s' is now a member of "
-                                            "changelist '%s'.\n"),
-                                    path_local, n->changelist_name)))
+      if ((err = svn_cmdline_printf(pool, "A [%s] %s\n",
+                                    n->changelist_name, path_local)))
         goto print_error;
       break;
 
     case svn_wc_notify_changelist_clear:
+    case svn_wc_notify_changelist_moved:
       if ((err = svn_cmdline_printf(pool,
-                                    _("Path '%s' is no longer a member of "
-                                      "a changelist.\n"),
-                                    path_local)))
+                                    "D [%s] %s\n",
+                                    n->changelist_name, path_local)))
         goto print_error;
       break;
 
-    case svn_wc_notify_changelist_moved:
-      svn_handle_warning2(stderr, n->err, "svn: ");
-      break;
-
     case svn_wc_notify_merge_begin:
       if (n->merge_range == NULL)
         err = svn_cmdline_printf(pool,

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/patch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/patch-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/patch-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/patch-cmd.c Tue Aug 10 22:07:24 2010
@@ -67,7 +67,7 @@ svn_cl__patch(apr_getopt_t *os,
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
 
   svn_opt_push_implicit_dot_target(targets, pool);
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
   SVN_ERR(svn_dirent_get_absolute(&abs_target_path,
                                   APR_ARRAY_IDX(targets, 0, const char *),
                                   pool));

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/propdel-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/propdel-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/propdel-cmd.c Tue Aug 10 22:07:24 2010
@@ -97,7 +97,7 @@ svn_cl__propdel(apr_getopt_t *os,
       ctx->notify_baton2 = &nwb;
     }
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   if (opt_state->revprop)  /* operate on a revprop */
     {

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/propedit-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/propedit-cmd.c Tue Aug 10 22:07:24 2010
@@ -176,7 +176,7 @@ svn_cl__propedit(apr_getopt_t *os,
              _("Explicit target argument required"));
         }
 
-      SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, pool));
+      SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
       /* For each target, edit the property PNAME. */
       for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/propset-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/propset-cmd.c Tue Aug 10 22:07:24 2010
@@ -109,7 +109,7 @@ svn_cl__propset(apr_getopt_t *os,
   if (opt_state->revprop)
     svn_opt_push_implicit_dot_target(targets, scratch_pool);
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, scratch_pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
   if (opt_state->revprop)  /* operate on a revprop */
     {

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/resolve-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/resolve-cmd.c Tue Aug 10 22:07:24 2010
@@ -95,7 +95,7 @@ svn_cl__resolve(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_empty;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, scratch_pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/resolved-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/resolved-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/resolved-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/resolved-cmd.c Tue Aug 10 22:07:24 2010
@@ -66,7 +66,7 @@ svn_cl__resolved(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_empty;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, scratch_pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/revert-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/revert-cmd.c Tue Aug 10 22:07:24 2010
@@ -65,7 +65,7 @@ svn_cl__revert(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_empty;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, scratch_pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
   err = svn_client_revert2(targets, opt_state->depth,
                            opt_state->changelists, ctx, scratch_pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/svn/status-cmd.c?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/svn/status-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/svn/status-cmd.c Tue Aug 10 22:07:24 2010
@@ -74,7 +74,7 @@ struct status_baton
 struct status_cache
 {
   const char *path;
-  svn_wc_status3_t *status;
+  svn_client_status_t *status;
 };
 
 /* Print conflict stats accumulated in status baton SB.
@@ -143,7 +143,7 @@ print_finish_target_xml(svn_revnum_t rep
 static svn_error_t *
 print_status_normal_or_xml(void *baton,
                            const char *path,
-                           const svn_wc_status3_t *status,
+                           const svn_client_status_t *status,
                            apr_pool_t *pool)
 {
   struct status_baton *sb = baton;
@@ -167,19 +167,18 @@ print_status_normal_or_xml(void *baton,
 static svn_error_t *
 print_status(void *baton,
              const char *path,
-             const svn_wc_status3_t *status,
+             const svn_client_status_t *status,
              apr_pool_t *pool)
 {
   struct status_baton *sb = baton;
-  svn_wc_status3_t *tweaked_status;
+
   svn_revnum_t revision;
   svn_revnum_t changed_rev;
   apr_time_t changed_date;
   const char *changed_author;
   const char *local_abspath;
 
-  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, sb->cl_pool));
-  tweaked_status = svn_wc_dup_status3(status, sb->cl_pool);
+  local_abspath = status->local_abspath;
 
   /* ### The revision information with associates are based on what
    * ### _read_info() returns. The svn_wc_status_func4_t callback is
@@ -187,8 +186,14 @@ print_status(void *baton,
    * ### WORKING nodes on its own. Until we've agreed on how the CLI should
    * ### handle the revision information, we use this appproach to stay compat
    * ### with our testsuite. */
-  if (status->versioned)
+  if (status->versioned
+      && !SVN_IS_VALID_REVNUM(status->revision)
+      && !status->copied)
     {
+      svn_client_status_t *tweaked_status
+                 = svn_client_status_dup(status, sb->cl_pool);
+
+      /* Retrieve some data from the original version of the replaced node */
       SVN_ERR(svn_wc__node_get_working_rev_info(&revision, &changed_rev,
                                                 &changed_date,
                                                 &changed_author,
@@ -199,6 +204,8 @@ print_status(void *baton,
       tweaked_status->changed_rev = changed_rev;
       tweaked_status->changed_date = changed_date;
       tweaked_status->changed_author = changed_author;
+
+      status = tweaked_status;
     }
 
   /* If the path is part of a changelist, then we don't print
@@ -211,7 +218,7 @@ print_status(void *baton,
       const char *cl_key = apr_pstrdup(sb->cl_pool, status->changelist);
       struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
       scache->path = apr_pstrdup(sb->cl_pool, path);
-      scache->status = svn_wc_dup_status3(tweaked_status, sb->cl_pool);
+      scache->status = svn_client_status_dup(status, sb->cl_pool);
 
       path_array =
         apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);
@@ -227,7 +234,7 @@ print_status(void *baton,
       return SVN_NO_ERROR;
     }
 
-  return print_status_normal_or_xml(baton, path, tweaked_status, pool);
+  return print_status_normal_or_xml(baton, path, status, pool);
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
@@ -290,7 +297,7 @@ svn_cl__status(apr_getopt_t *os,
   sb.tree_conflicts = 0;
   sb.ctx = ctx;
 
-  SVN_ERR(svn_opt_eat_peg_revisions(&targets, targets, scratch_pool));
+  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
@@ -308,8 +315,7 @@ svn_cl__status(apr_getopt_t *os,
 
       /* Retrieve a hash of status structures with the information
          requested by the user. */
-      SVN_ERR(svn_cl__try(svn_client_status5(&repos_rev, target, &rev,
-                                             print_status, &sb,
+      SVN_ERR(svn_cl__try(svn_client_status5(&repos_rev, ctx, target, &rev,
                                              opt_state->depth,
                                              opt_state->verbose,
                                              opt_state->update,
@@ -317,7 +323,8 @@ svn_cl__status(apr_getopt_t *os,
                                              opt_state->ignore_externals,
                                              opt_state->ignore_mergeinfo,
                                              opt_state->changelists,
-                                             ctx, iterpool),
+                                             print_status, &sb,
+                                             iterpool),
                           NULL, opt_state->quiet,
                           /* not versioned: */
                           SVN_ERR_WC_NOT_WORKING_COPY,