You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <e....@gmx.net> on 2003/11/05 22:40:52 UTC

[PATCH] issue #897: libsvn_client

Hi!

My first revision of a patch for libsvn_client cf issue 897.

Comments?

bye,

Erik.

available at
http://encorps.dnsalias.com/patches/897-libsvn_client-messages.patch


Log
[[[
Change error messages cf issue 897 on library by library
basis; for starters: libsvn_client

* subversion/libsvn_client/switch.c
* subversion/libsvn_client/repos_diff.c
* subversion/libsvn_client/export.c
* subversion/libsvn_client/revisions.c
* subversion/libsvn_client/status.c
* subversion/libsvn_client/prop_commands.c
* subversion/libsvn_client/auth.c
* subversion/libsvn_client/ra.c
* subversion/libsvn_client/checkout.c
* subversion/libsvn_client/cat.c
* subversion/libsvn_client/diff.c
* subversion/libsvn_client/copy.c
* subversion/libsvn_client/blame.c
* subversion/libsvn_client/log.c
* subversion/libsvn_client/update.c
* subversion/libsvn_client/commit.c
  Start with upper case letter, remove function names 
  from messages, rewrite 'we' messages to statements

]]]

Index: subversion/libsvn_client/switch.c
===================================================================
--- subversion/libsvn_client/switch.c	(revision 7644)
+++ subversion/libsvn_client/switch.c	(working copy)
@@ -108,12 +108,12 @@
   if (! entry)
     return svn_error_createf
       (SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-       "svn_client_switch: '%s' is not under version control", path);
+       "'%s' is not under version control", path);
 
   if (! entry->url)
     return svn_error_createf
       (SVN_ERR_ENTRY_MISSING_URL, NULL,
-       "svn_client_switch: entry '%s' has no URL", path);
+       "Entry '%s' has no URL", path);
 
   if (entry->kind == svn_node_file)
     {
@@ -124,12 +124,12 @@
       if (! session_entry)
         return svn_error_createf
           (SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-           "svn_client_switch: '%s' is not under version control", anchor);
+           "'%s' is not under version control", anchor);
 
       if (! session_entry->url)
         return svn_error_createf
           (SVN_ERR_ENTRY_MISSING_URL, NULL,
-           "svn_client_switch: directory '%s' has no URL", anchor);
+           "Directory '%s' has no URL", anchor);
     }
   else if (entry->kind == svn_node_dir)
     {
Index: subversion/libsvn_client/repos_diff.c
===================================================================
--- subversion/libsvn_client/repos_diff.c	(revision 7644)
+++ subversion/libsvn_client/repos_diff.c	(working copy)
@@ -337,7 +337,7 @@
 
   status = apr_file_close (file);
   if (status)
-    return svn_error_createf (status, NULL, "failed to close file '%s'",
+    return svn_error_createf (status, NULL, "Failed to close file '%s'",
                               b->path_start_revision);
 
   return SVN_NO_ERROR;
@@ -376,7 +376,7 @@
   status = apr_file_close (file);
   if (status)
     return svn_error_createf (status, NULL,
-                              "failed to create empty file '%s'",
*empty_file);
+                              "Failed to create empty file '%s'",
*empty_file);
   return SVN_NO_ERROR;
 }
 
@@ -691,13 +691,13 @@
       status = apr_file_close (b->file_start_revision);
       if (status)
         return svn_error_createf (status, NULL,
-                                  "failed to close file '%s'",
+                                  "Failed to close file '%s'",
                                   b->path_start_revision);
 
       status = apr_file_close (b->file_end_revision);
       if (status)
         return svn_error_createf (status, NULL,
-                                  "failed to close file '%s'",
+                                  "Failed to close file '%s'",
                                   b->path_end_revision);
     }
 
Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c	(revision 7644)
+++ subversion/libsvn_client/export.c	(working copy)
@@ -513,7 +513,7 @@
 
   apr_err = apr_file_close (fb->tmp_file);
   if (apr_err)
-    return svn_error_createf (apr_err, NULL, "error closing file '%s'",
+    return svn_error_createf (apr_err, NULL, "Error closing file '%s'",
                               fb->tmppath);
 
   if (text_checksum)
@@ -525,7 +525,7 @@
         {
           return svn_error_createf
             (SVN_ERR_CHECKSUM_MISMATCH, NULL,
-             "close_file: checksum mismatch for resulting fulltext\n"
+             "Checksum mismatch for resulting fulltext\n"
              "(%s):\n"
              "   expected checksum:  %s\n"
              "   actual checksum:    %s\n",
Index: subversion/libsvn_client/revisions.c
===================================================================
--- subversion/libsvn_client/revisions.c	(revision 7644)
+++ subversion/libsvn_client/revisions.c	(working copy)
@@ -55,9 +55,7 @@
           || (revision->kind == svn_opt_revision_head)))
     {
       return svn_error_create
-        (SVN_ERR_CLIENT_RA_ACCESS_REQUIRED, NULL,
-         "svn_client__get_revision_number: "
-         "need ra_lib and session for date or head revisions.");
+        (SVN_ERR_CLIENT_RA_ACCESS_REQUIRED, NULL, NULL);
     }
 
   if (revision->kind == svn_opt_revision_number)
@@ -81,8 +79,7 @@
       if (path == NULL)
         return svn_error_create
           (SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, NULL,
-           "svn_client__get_revision_number: "
-           "need a version-controlled path to fetch local revision info.");
+           "Need a version-controlled path to fetch local revision info.");
 
       SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, FALSE,
FALSE,
                                       pool));
@@ -92,7 +89,7 @@
       if (! ent)
         return svn_error_createf
         (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
-         "svn_client__get_revision: '%s' not under version control", path);
+	 "'%s' not under version control", path);
       
       if ((revision->kind == svn_opt_revision_base)
           || (revision->kind == svn_opt_revision_working))
@@ -107,8 +104,7 @@
   else
     return svn_error_createf
       (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-       "svn_client__get_revision_number: "
-       "unrecognized revision type requested for '%s'", path);
+       "Unrecognized revision type requested for '%s'", path);
   
   return SVN_NO_ERROR;
 }
Index: subversion/libsvn_client/status.c
===================================================================
--- subversion/libsvn_client/status.c	(revision 7644)
+++ subversion/libsvn_client/status.c	(working copy)
@@ -157,11 +157,11 @@
       if (! entry)
         return svn_error_createf
           (SVN_ERR_ENTRY_NOT_FOUND, NULL,
-           "svn_client_status: '%s' is not under version control", anchor);
+           "'%s' is not under version control", anchor);
       if (! entry->url)
         return svn_error_createf
           (SVN_ERR_ENTRY_MISSING_URL, NULL,
-           "svn_client_status: entry '%s' has no URL", anchor);
+           "Entry '%s' has no URL", anchor);
       URL = apr_pstrdup (pool, entry->url);
 
       /* Get the RA library that handles URL. */
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c	(revision 7644)
+++ subversion/libsvn_client/prop_commands.c	(working copy)
@@ -427,7 +427,7 @@
     {
       return svn_error_createf
         (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-         "unknown node kind for \"%s\"",
+         "Unknown node kind for \"%s\"",
          svn_path_join (target_prefix, target_relative, pool));
     }
   
@@ -543,7 +543,7 @@
       else
         {
           return svn_error_create
-            (SVN_ERR_CLIENT_BAD_REVISION, NULL, "unknown revision kind");
+            (SVN_ERR_CLIENT_BAD_REVISION, NULL, "Unknown revision kind");
         }
 
       SVN_ERR (ra_lib->check_path (session, "", revnum, &kind, pool));
@@ -699,7 +699,7 @@
     {
       return svn_error_createf
         (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-         "unknown node kind for \"%s\"",
+         "Unknown node kind for \"%s\"",
          svn_path_join (target_prefix, target_relative, pool));
     }
   
@@ -912,7 +912,7 @@
       else
         {
           return svn_error_create
-            (SVN_ERR_CLIENT_BAD_REVISION, NULL, "unknown revision kind");
+            (SVN_ERR_CLIENT_BAD_REVISION, NULL, "Unknown revision kind");
         }
 
       SVN_ERR (ra_lib->check_path (session, "", revnum, &kind, pool));
Index: subversion/libsvn_client/auth.c
===================================================================
--- subversion/libsvn_client/auth.c	(revision 7644)
+++ subversion/libsvn_client/auth.c	(working copy)
@@ -73,7 +73,7 @@
     {
       return svn_error_createf
         (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-         "unknown node kind for '%s'", path);
+         "Unknown node kind for '%s'", path);
     }
   
   return SVN_NO_ERROR;
Index: subversion/libsvn_client/ra.c
===================================================================
--- subversion/libsvn_client/ra.c	(revision 7644)
+++ subversion/libsvn_client/ra.c	(working copy)
@@ -308,8 +308,7 @@
 
   if (! entry)
     return svn_error_createf (SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                              "svn_client_uuid_from_path: "
-                              "can't find entry for '%s'", path);
+                              "Can't find entry for '%s'", path);
 
   if (entry->uuid)
     {
Index: subversion/libsvn_client/checkout.c
===================================================================
--- subversion/libsvn_client/checkout.c	(revision 7644)
+++ subversion/libsvn_client/checkout.c	(working copy)
@@ -65,8 +65,7 @@
   if ((revision->kind != svn_opt_revision_number)
       && (revision->kind != svn_opt_revision_date)
       && (revision->kind != svn_opt_revision_head))
-    return svn_error_create (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-                             "Bogus revision passed to
svn_client_checkout");
+    return svn_error_create (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
 
   /* Canonicalize the URL. */
   URL = svn_path_canonicalize (URL, pool);
Index: subversion/libsvn_client/cat.c
===================================================================
--- subversion/libsvn_client/cat.c	(revision 7644)
+++ subversion/libsvn_client/cat.c	(working copy)
@@ -123,7 +123,7 @@
       /* rewind our stream. */
       apr_err = apr_file_seek (tmp_file, APR_SET, &off);
       if (apr_err)
-        return svn_error_createf (apr_err, NULL, "seek failed on '%s'.",
+        return svn_error_createf (apr_err, NULL, "Seek failed on '%s'.",
                                   tmp_filename);
 
       if (eol_style)
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c	(revision 7644)
+++ subversion/libsvn_client/diff.c	(working copy)
@@ -1174,7 +1174,7 @@
   SVN_ERR (svn_wc_adm_close (adm_access));
   if (! entry)
     return svn_error_createf (SVN_ERR_ENTRY_NOT_FOUND, NULL,
-                              "convert_to_url: '%s' is not versioned",
path);
+                              "'%s' is not versioned", path);
 
   if (entry->url)  
     *url = apr_pstrdup (pool, entry->url);
@@ -1219,8 +1219,8 @@
       || (revision2->kind == svn_opt_revision_unspecified))
     {
       return svn_error_create
-        (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-         "do_merge: caller failed to specify all revisions");
+        (SVN_ERR_CLIENT_BAD_REVISION, NULL, 
+	 "Not all required revisions specified");
     }
 
   SVN_ERR (svn_client__default_auth_dir (&auth_dir, target_wcpath, pool));
@@ -1316,7 +1316,7 @@
                              NULL, props, pool));
   status = apr_file_close (fp);
   if (status)
-    return svn_error_createf (status, NULL, "failed to close '%s'",
*filename);
+    return svn_error_createf (status, NULL, "Failed to close '%s'",
*filename);
 
   return SVN_NO_ERROR;
 }
@@ -1478,8 +1478,8 @@
     return unsupported_diff_error
       (svn_error_create 
        (SVN_ERR_INCORRECT_PARAMS, NULL,
-        "diff_wc_wc: we only support diffs between a path's text-base "
-        "and its working files at this time"));
+        "Only diffs between a path's text-base "
+        "and its working files are supported at this time"));
 
   SVN_ERR (svn_wc_get_actual_target (path1, &anchor, &target, pool));
   SVN_ERR (svn_io_check_path (path1, &kind, pool));
@@ -1812,7 +1812,7 @@
   if ((revision1->kind == svn_opt_revision_unspecified)
       || (revision2->kind == svn_opt_revision_unspecified))
     return svn_error_create (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-                             "do_diff: not all revisions are specified");
+                             "Not all required revisions are specified");
 
   /* Revisions can be said to be local or remote.  BASE and WORKING,
      for example, are local.  */
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c	(revision 7644)
+++ subversion/libsvn_client/copy.c	(working copy)
@@ -77,7 +77,7 @@
   SVN_ERR (svn_io_check_path (src_path, &src_kind, pool));
   if (src_kind == svn_node_none)
     return svn_error_createf (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-                              "path '%s' does not exist.", src_path);
+                              "Path '%s' does not exist.", src_path);
 
   /* If DST_PATH does not exist, then its basename will become a new
      file or dir added to its parent (possibly an implicit '.').  If
@@ -96,7 +96,7 @@
     }
   else
     return svn_error_createf (SVN_ERR_ENTRY_EXISTS, NULL,
-                              "file '%s' already exists.", dst_path);
+                              "File '%s' already exists.", dst_path);
 
   if (is_move)
     {
@@ -319,7 +319,7 @@
   /* We can't move something into itself, period. */
   if (svn_path_is_empty (src_rel) && is_move)
     return svn_error_createf (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                              "cannot move URL '%s' into itself", src_url);
+                              "Cannot move URL '%s' into itself", src_url);
 
   /* Get the RA vtable that matches URL. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
@@ -383,7 +383,7 @@
   if (src_kind == svn_node_none)
     return svn_error_createf 
       (SVN_ERR_FS_NOT_FOUND, NULL,
-       "path '%s' does not exist in revision '%" SVN_REVNUM_T_FMT "'",
+       "Path '%s' does not exist in revision '%" SVN_REVNUM_T_FMT "'",
        src_url, src_revnum);
 
   /* Figure out the basename that will result from this operation. */
@@ -396,7 +396,7 @@
     {
       /* We disallow the overwriting of files. */
       return svn_error_createf (SVN_ERR_FS_ALREADY_EXISTS, NULL,
-                                "fs path '%s' already exists.", dst_rel);
+                                "Path '%s' already exists.", dst_rel);
     }
   else if (dst_kind == svn_node_dir)
     {
@@ -412,12 +412,12 @@
                                    &attempt_kind, pool));
       if (attempt_kind != svn_node_none)
         return svn_error_createf (SVN_ERR_FS_ALREADY_EXISTS, NULL,
-                                  "fs path '%s' already exists.", dst_rel);
+                                  "Path '%s' already exists.", dst_rel);
     }
   else
     {
       return svn_error_createf (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-                                "unrecognized node kind of '%s'.",
dst_url);
+                                "Unrecognized node kind of '%s'.",
dst_url);
     }
 
   /* Create a new commit item and add it to the array. */
@@ -633,7 +633,7 @@
       /* DST_URL is an existing file, which can't be overwritten or
          used as a container, so error out. */
       return svn_error_createf (SVN_ERR_FS_ALREADY_EXISTS, NULL,
-                                "file '%s' already exists.", dst_url);
+                                "File '%s' already exists.", dst_url);
     }
 
   /* Create a new commit item and add it to the array. */
@@ -784,12 +784,12 @@
       if (SVN_IS_VALID_REVNUM (src_revnum))
         return svn_error_createf
           (SVN_ERR_FS_NOT_FOUND, NULL,
-           "path '%s' not found in revision '%" SVN_REVNUM_T_FMT "'",
+           "Path '%s' not found in revision '%" SVN_REVNUM_T_FMT "'",
            src_url, src_revnum);
       else
         return svn_error_createf
           (SVN_ERR_FS_NOT_FOUND, NULL,
-           "path '%s' not found in head revision", src_url);
+           "Path '%s' not found in head revision", src_url);
     }
 
   /* There are two interfering sets of cases to watch out for here:
@@ -826,7 +826,7 @@
   else if (dst_kind != svn_node_none)  /* must be a file */
     {
       return svn_error_createf (SVN_ERR_ENTRY_EXISTS, NULL,
-                                "file '%s' already exists.", dst_path);
+                                "File '%s' already exists.", dst_path);
     }
 
   /* Now that dst_path has possibly been reset, check that there's
@@ -849,7 +849,7 @@
     if (ent && (ent->kind != svn_node_dir))
       return svn_error_createf
         (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-         "there is already an entry for '%s'\n"
+         "Entry for '%s' exists\n"
          "     (though the working file is missing)",
          dst_path);
   }
@@ -962,7 +962,7 @@
       status = apr_file_close (fp);
       if (status)
         return svn_error_createf
-          (status, NULL, "failed to close file '%s'", dst_path);
+          (status, NULL, "Failed to close file '%s'", dst_path);
 
       /* If SRC_REVNUM is invalid (HEAD), then REAL_REV is now the
          revision that was actually retrieved.  This is the value we
@@ -1004,7 +1004,7 @@
       && svn_path_is_child (src_path, dst_path, pool))
     return svn_error_createf
       (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-       "cannot copy path '%s' into its own child '%s'",
+       "Cannot copy path '%s' into its own child '%s'",
        src_path, dst_path);
 
   if (is_move)
@@ -1014,7 +1014,7 @@
           if (strcmp (src_path, dst_path) == 0)
             return svn_error_createf
               (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-               "cannot move path '%s' into itself",
+               "Cannot move path '%s' into itself",
                src_path);
         }
       else
@@ -1022,7 +1022,7 @@
           /* Disallow moves between the working copy and the repository. */
           return svn_error_create 
             (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-             "no support for repos <--> working copy moves");
+             "No support for repos <--> working copy moves");
         }
 
       /* It doesn't make sense to specify revisions in a move. */
@@ -1037,7 +1037,7 @@
         {
           return svn_error_create
             (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-             "cannot specify revisions with move operations");
+             "Cannot specify revisions with move operations");
         }
     }
   else
Index: subversion/libsvn_client/blame.c
===================================================================
--- subversion/libsvn_client/blame.c	(revision 7644)
+++ subversion/libsvn_client/blame.c	(working copy)
@@ -361,8 +361,7 @@
   if (start->kind == svn_opt_revision_unspecified
       || end->kind == svn_opt_revision_unspecified)
     return svn_error_create
-      (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-       "svn_client_blame: caller failed to supply revisions");
+      (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
 
   iterpool = svn_pool_create (pool);
 
@@ -389,7 +388,7 @@
   if (end_revnum < start_revnum)
     return svn_error_create
       (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-       "svn_client_blame: start revision must precede end revision");
+       "Start revision must precede end revision");
 
   SVN_ERR (ra_lib->check_path (session, "", end_revnum, &kind, pool));
 
@@ -450,7 +449,7 @@
       SVN_ERR (svn_stream_close (stream));
       apr_err = apr_file_close (file);
       if (apr_err != APR_SUCCESS)
-        return svn_error_createf (apr_err, NULL, "error closing %s", 
+        return svn_error_createf (apr_err, NULL, "Error closing %s", 
                                   rev->path);
       if (last)
         {
@@ -460,7 +459,7 @@
           SVN_ERR (svn_diff_output (diff, &db, &output_fns));
           apr_err = apr_file_remove (last, iterpool);
           if (apr_err != APR_SUCCESS)
-            return svn_error_createf (apr_err, NULL, "error removing %s", 
+            return svn_error_createf (apr_err, NULL, "Error removing %s", 
                                       last);
         }
       else
@@ -471,7 +470,7 @@
 
   apr_err = apr_file_open (&file, last, APR_READ, APR_OS_DEFAULT, pool);
   if (apr_err != APR_SUCCESS)
-    return svn_error_createf (apr_err, NULL, "error opening %s", last);
+    return svn_error_createf (apr_err, NULL, "Error opening %s", last);
 
   stream = svn_stream_from_aprfile (file, pool);
   for (walk = db.blame; walk; walk = walk->next)
@@ -495,10 +494,10 @@
   SVN_ERR (svn_stream_close (stream));
   apr_err = apr_file_close (file);
   if (apr_err != APR_SUCCESS)
-    return svn_error_createf (apr_err, NULL, "error closing %s", last);
+    return svn_error_createf (apr_err, NULL, "Error closing %s", last);
   apr_err = apr_file_remove (last, pool);
   if (apr_err != APR_SUCCESS)
-    return svn_error_createf (apr_err, NULL, "error removing %s", last);
+    return svn_error_createf (apr_err, NULL, "Error removing %s", last);
 
   apr_pool_destroy (iterpool);
   return SVN_NO_ERROR;
Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c	(revision 7644)
+++ subversion/libsvn_client/log.c	(working copy)
@@ -71,7 +71,7 @@
     {
       return svn_error_create
         (SVN_ERR_CLIENT_BAD_REVISION, NULL,
-         "svn_client_log: caller failed to supply revision");
+         "Missing required revision specification");
     }
 
   start_revnum = end_revnum = SVN_INVALID_REVNUM;
@@ -141,7 +141,7 @@
           if (! entry->url)
             return svn_error_createf
               (SVN_ERR_ENTRY_MISSING_URL, NULL,
-              "svn_client_log: entry '%s' has no URL", target);
+              "Entry '%s' has no URL", target);
           URL = apr_pstrdup (pool, entry->url);
           SVN_ERR (svn_wc_adm_close (adm_access));
           (*((const char **)apr_array_push (target_urls))) = URL;
Index: subversion/libsvn_client/update.c
===================================================================
--- subversion/libsvn_client/update.c	(revision 7644)
+++ subversion/libsvn_client/update.c	(working copy)
@@ -73,11 +73,11 @@
   if (! entry)
     return svn_error_createf
       (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-       "svn_client_update: '%s' is not under version control", anchor);
+       "'%s' is not under version control", anchor);
   if (! entry->url)
     return svn_error_createf
       (SVN_ERR_ENTRY_MISSING_URL, NULL,
-       "svn_client_update: entry '%s' has no URL", anchor);
+       "Entry '%s' has no URL", anchor);
   URL = apr_pstrdup (pool, entry->url);
 
   /* Get revnum set to something meaningful, so we can fetch the
Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c	(revision 7644)
+++ subversion/libsvn_client/commit.c	(working copy)
@@ -79,7 +79,7 @@
   apr_err = apr_file_close (f);
   if (apr_err)
     return svn_error_createf
-      (apr_err, NULL, "error closing '%s'", path);
+      (apr_err, NULL, "Error closing '%s'", path);
 
   return SVN_NO_ERROR;
 }
@@ -297,7 +297,7 @@
   if (! (APR_STATUS_IS_ENOENT (err->apr_err)))
     {
       return svn_error_createf
-        (err->apr_err, err, "error during import of '%s'", path);
+        (err->apr_err, err, "Error during import of '%s'", path);
     }
   /* Yes, it exited cleanly, so close the dir. */
   else
@@ -305,7 +305,7 @@
       svn_error_clear (err);
       if ((apr_err = apr_dir_close (dir)))
         return svn_error_createf
-          (apr_err, NULL, "error closing dir '%s'", path);
+          (apr_err, NULL, "Error closing dir '%s'", path);
     }
 
   svn_pool_destroy (subpool);
@@ -410,7 +410,7 @@
           if (! new_entry)
             return svn_error_create
                 (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-                 "new entry name required when importing a file");
+                 "New entry name required when importing a file");
 
           SVN_ERR (import_file (editor, root_baton,
                                 path, new_entry, ctx, pool));
@@ -520,7 +520,7 @@
                                       &kind, pool));
       if (kind == svn_node_none)
         return svn_error_createf (SVN_ERR_FS_NO_SUCH_ENTRY, NULL,
-                                  "the path '%s' does not exist",
+                                  "Path '%s' does not exist",
                                   base_url);
     }
 
@@ -650,14 +650,14 @@
       if (kind == svn_node_file && (! new_entry))
         return svn_error_createf
           (SVN_ERR_ENTRY_EXISTS, NULL,
-           "the path \"%s\" already exists", url);
+           "Path \"%s\" already exists", url);
     }
 
   /* The repository doesn't know about the reserved. */
   if (new_entry && (strcmp (new_entry, SVN_WC_ADM_DIR_NAME) == 0))
     return svn_error_createf
       (SVN_ERR_CL_ADM_DIR_RESERVED, NULL,
-       "the name \"%s\" is reserved and cannot be imported",
+       "\"%s\" is a reserved name and cannot be imported",
        SVN_WC_ADM_DIR_NAME);
 
 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2003-11-06 at 02:06, Branko Čibej wrote:
> If we know that the message has several "logical" lines (as in the
> checksum mismatch example), then IMHO we should use
> svn_error_quick_wrap.

I strongly disagree.  We should not generate a three-level error in
order to present three sequential pieces of information to the user.
svn_error_quick_wrap only makes sense when we want to annotate an error
from a lower-level function with higher-level information.

>  Any other kind of wrapping sould have to be done
> by the client, since the client knows best how to display the errors.
> Yes, the cmdline-specific svn_handle_error is in libsvn_subr, but that's
> a special case and GUI clients can do anything they like.

For the command-line client, we should not be wrapping filenames in
error messages, even if they're very long.  On the other hand, if we're
in libsvn_client and we want to present a 300-word essay on how to
resolve a commit error, that should be wrapped.  But the client has no
idea how to distinguish a filename from a 300-word essay, so it doesn't
know how to wrap.

Fortunately, we do not currently present any 300-word essays, so the
issue is somewhat academic right now.  For the specific case of the
checksum error, I think we can shoehorn the information onto one line
without sacrificing clarity; that should allow Erik to put off the issue
now.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [PATCH] issue #897: libsvn_client

Posted by Branko Čibej <br...@xbc.nu>.
Erik Huelsmann wrote:

>Hmm, Now that you mention those. I think I should have indeed picked up on
>that. I will revise the patch and resubmit when it is ready. 
>
>One problem remains: I raised the question on IRC, bug Greg Hudson said it
>should not be a problem, since there are no long error messages: the issue
>discusses wrapping at 70 columns. We do have long error messages (when filenames
>are %s-ed in) and we do have messages with multiple lines. Is it an option
>to svn_error_quick_wrap the extra lines into other error structures?
>  
>
If we know that the message has several "logical" lines (as in the
checksum mismatch example), then IMHO we should use
svn_error_quick_wrap. Any other kind of wrapping sould have to be done
by the client, since the client knows best how to display the errors.
Yes, the cmdline-specific svn_handle_error is in libsvn_subr, but that's
a special case and GUI clients can do anything they like.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Erik Huelsmann <e....@gmx.net>.
Hmm, Now that you mention those. I think I should have indeed picked up on
that. I will revise the patch and resubmit when it is ready. 

One problem remains: I raised the question on IRC, bug Greg Hudson said it
should not be a problem, since there are no long error messages: the issue
discusses wrapping at 70 columns. We do have long error messages (when filenames
are %s-ed in) and we do have messages with multiple lines. Is it an option
to svn_error_quick_wrap the extra lines into other error structures?

bye,

Erik.

> Erik Huelsmann wrote:
> 
> >Hi!
> >
> >My first revision of a patch for libsvn_client cf issue 897.
> >
> >Comments?
> >  
> >
> There are a few more things that could be done for consistency.
> 
>     * Qotes within error messages: '%s' vs. \"%s\". I think we meant to
>       standardise on single quotes.
>     * Message texts
>           o Close-file errors:  "Failed to close file '%s'" vs. "Error
>             closing file '%s'"
>           o Unversioned resource errors: "'%s' is not under version
>             control" vs. "'%s' not under version control" vs. "'%s' is
>             not versioned". And we seem to be using two different error
>             codes for these, SVN_ERR_WC_PATH_NOT_FOUND and
>             SVN_ERR_ENTRY_NOT_FOUND
> 
> I don't know if fixing these inconsistencies was what you intended.
> 
> 
> >Index: subversion/libsvn_client/export.c
> >===================================================================
> >--- subversion/libsvn_client/export.c	(revision 7644)
> >+++ subversion/libsvn_client/export.c	(working copy)
> >@@ -513,7 +513,7 @@
> > 
> >   apr_err = apr_file_close (fb->tmp_file);
> >   if (apr_err)
> >-    return svn_error_createf (apr_err, NULL, "error closing file '%s'",
> >+    return svn_error_createf (apr_err, NULL, "Error closing file '%s'",
> >                               fb->tmppath);
> > 
> >   if (text_checksum)
> >@@ -525,7 +525,7 @@
> >         {
> >           return svn_error_createf
> >             (SVN_ERR_CHECKSUM_MISMATCH, NULL,
> >-             "close_file: checksum mismatch for resulting fulltext\n"
> >+             "Checksum mismatch for resulting fulltext\n"
> >              "(%s):\n"
> >              "   expected checksum:  %s\n"
> >              "   actual checksum:    %s\n",
> >  
> >
> We shouldn't have multi-line error messages. They may be marginally
> acceptable for the command-line client, but play badly with GUI clients.
> Instead, we should create a chain of (wrapped) errors with the same
> error code, but different message text.
> 
> 
> 
> -- 
> Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Julian Foad <ju...@btopenworld.com>.
Erik Huelsmann wrote:
> Great! I'd happily apply the wrapper to the occurrances I find when sifting
> through the libraries.

Please will you do this as a separate patch, either before or after the message-changing patch.  That will make it much easier to review.

- Julian


>>How about I make the following addition so that most invocations of
>>apr_file_close can be changed to SVN_ERR (svn_io_file_close) instead of being
>>followed by manual construction of an error message?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Erik Huelsmann <e....@gmx.net>.
Great! I'd happily apply the wrapper to the occurrances I find when sifting
through the libraries.

bye,

Erik.

> Branko Čibej wrote:
> > Erik Huelsmann wrote:
> >>
> >>My first revision of a patch for libsvn_client cf issue 897.
> > 
> > There are a few more things that could be done for consistency.
> ...
> >     * Message texts
> >           o Close-file errors:  "Failed to close file '%s'" vs. "Error
> >             closing file '%s'"
> 
> How about I make the following addition so that most invocations of
> apr_file_close can be changed to SVN_ERR (svn_io_file_close) instead of
being
> followed by manual construction of an error message?
> 
> - Julian
> 
> 
> [[[
> Add a wrapper around apr_file_close to allow more concise error handling.
> 
> The new function svn_io_file_close complements svn_io_file_open and
> returns
> an svn_error_t so that errors can be dealt with by use of SVN_ERR rather
> than
> by manual construction of an error message at each call site.
> 
> * subversion/include/svn_io.h
>   (svn_io_file_close): New wrapper around apr_file_close.
> 
> * subversion/libsvn_subr/io.c
>   (file_name_get): New helper function.
>   (svn_stringbuf_from_aprfile): Use file_name_get.
>   (svn_io_file_close): New function, also using file_name_get.
> ]]]
> 
> Index: subversion/include/svn_io.h
> ===================================================================
> --- subversion/include/svn_io.h (revision 7646)
> +++ subversion/include/svn_io.h (working copy)
> @@ -636,6 +636,11 @@
>                    apr_pool_t *pool);
> 
> 
> +/** Wrapper for @c apr_file_close(), which see. */
> +svn_error_t *
> +svn_io_file_close (apr_file_t *file, apr_pool_t *pool);
> +
> +
>  /** Wrapper for @c apr_stat(), which see.  @a fname is utf8-encoded. */
>  svn_error_t *
>  svn_io_stat (apr_finfo_t *finfo, const char *fname,
> Index: subversion/libsvn_subr/io.c
> ===================================================================
> --- subversion/libsvn_subr/io.c (revision 7646)
> +++ subversion/libsvn_subr/io.c (working copy)
> @@ -993,6 +993,28 @@
>  }
> 
> 
> +/* Get the name of FILE, or NULL if FILE is an unnamed stream. */
> +static svn_error_t *
> +file_name_get (const char **fname_utf8, apr_file_t *file, apr_pool_t
> *pool)
> +{
> +  apr_status_t apr_err;
> +  const char *fname;
> +
> +  apr_err = apr_file_name_get (&fname, file);
> +  if (apr_err)
> +    return svn_error_create
> +      (apr_err, NULL,
> +       "failed to get file name from APR");
> +
> +  if (fname)
> +    SVN_ERR (svn_path_cstring_to_utf8 (fname_utf8, fname, pool));
> +  else
> +    *fname_utf8 = NULL;
> +
> +  return SVN_NO_ERROR;
> +}
> +
> +
>  svn_error_t *
>  svn_stringbuf_from_aprfile (svn_stringbuf_t **result,
>                              apr_file_t *file,
> @@ -1001,23 +1023,10 @@
>    apr_size_t len;
>    apr_status_t apr_err;
>    svn_stringbuf_t *res = svn_stringbuf_create("", pool);
> -  const char *fname;
>    char buf[BUFSIZ];
> 
>    /* XXX: We should check the incoming data for being of type binary. */
> 
> -  apr_err = apr_file_name_get (&fname, file);
> -  if (apr_err)
> -    return svn_error_create
> -      (apr_err, NULL,
> -       "svn_stringbuf_from_aprfile: failed to get filename");
> -
> -  /* If the apr_file_t was opened with apr_file_open_std{in,out,err},
> then we
> -   * wont get a filename for it. We assume that since we are reading,
> that in
> -   * this case we would only ever be using stdin.  */
> -  if (NULL == fname)
> -    fname = "stdin";
> -
>    /* apr_file_read will not return data and eof in the same call. So this
> loop
>     * is safe from missing read data.  */
>    len = sizeof(buf);
> @@ -1033,9 +1042,14 @@
>    if (!APR_STATUS_IS_EOF(apr_err))
>      {
>        const char *fname_utf8;
> +      SVN_ERR (file_name_get (&fname_utf8, file, pool));
> 
> -      SVN_ERR (svn_path_cstring_to_utf8 (&fname_utf8, fname, pool));
> -
> +      /* If the apr_file_t was opened with apr_file_open_std{in,out,err},
> then
> +       * we won't get a filename for it. We assume that since we are
> reading,
> +       * that in this case we would only ever be using stdin. */
> +      if (NULL == fname_utf8)
> +        fname_utf8 = "(stdin)";
> +
>        return svn_error_createf
>          (apr_err, NULL,
>           "svn_stringbuf_from_aprfile: EOF not seen for '%s'",
> fname_utf8);
> @@ -1706,6 +1720,29 @@
> 
> 
>  svn_error_t *
> +svn_io_file_close (apr_file_t *file, apr_pool_t *pool)
> +{
> +  apr_status_t status;
> +
> +  status = apr_file_close (file);
> +
> +  if (status)
> +    {
> +      const char *fname_utf8;
> +      SVN_ERR (file_name_get (&fname_utf8, file, pool));
> +
> +      if (NULL == fname_utf8)
> +        fname_utf8 = "(stdin/out/err?)";
> +
> +      return svn_error_createf (status, NULL,
> +                                "svn_io_file_close: can't close '%s'",
> +                                fname_utf8);
> +    }
> +  return SVN_NO_ERROR;
> +}
> +
> +
> +svn_error_t *
>  svn_io_stat (apr_finfo_t *finfo, const char *fname,
>               apr_int32_t wanted, apr_pool_t *pool)
>  {
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> Branko Čibej wrote:
> 
>> Erik Huelsmann wrote:
>>>
>>> My first revision of a patch for libsvn_client cf issue 897.
>>
>> There are a few more things that could be done for consistency.
> ...
>>     * Message texts
>>           o Close-file errors:  "Failed to close file '%s'" vs. "Error
>>             closing file '%s'"
> 
> How about I make the following addition so that most invocations of 
> apr_file_close can be changed to SVN_ERR (svn_io_file_close) instead of 
> being followed by manual construction of an error message?

Committed in r7652.  You can now simplify things like this:

Index: subversion/libsvn_client/repos_diff.c
===================================================================
--- subversion/libsvn_client/repos_diff.c       (revision 7652)
+++ subversion/libsvn_client/repos_diff.c       (working copy)
@@ -314,7 +314,6 @@
 static svn_error_t *
 get_file_from_ra (struct file_baton *b)
 {
-  apr_status_t status;
   apr_file_t *file;
   svn_stream_t *fstream;
   const char *temp_dir;
@@ -335,10 +334,7 @@
                                             &(b->pristine_props),
                                             b->pool));

-  status = apr_file_close (file);
-  if (status)
-    return svn_error_createf (status, NULL, "failed to close file '%s'",
-                              b->path_start_revision);
+  SVN_ERR (svn_io_file_close (file, b->pool));

   return SVN_NO_ERROR;
 }
@@ -364,7 +360,6 @@
 create_empty_file (const char **empty_file,
                    apr_pool_t *pool)
 {
-  apr_status_t status;
   apr_file_t *file;
   const char *temp_dir;

@@ -373,10 +368,7 @@
                                     svn_path_join (temp_dir, "tmp", pool),
                                     "", FALSE, pool));

-  status = apr_file_close (file);
-  if (status)
-    return svn_error_createf (status, NULL,
-                              "failed to create empty file '%s'", *empty_file);
+  SVN_ERR (svn_io_file_close (file, pool));
   return SVN_NO_ERROR;
 }

@@ -686,19 +678,8 @@

   if (!window)
     {
-      apr_status_t status;
-
-      status = apr_file_close (b->file_start_revision);
-      if (status)
-        return svn_error_createf (status, NULL,
-                                  "failed to close file '%s'",
-                                  b->path_start_revision);
-
-      status = apr_file_close (b->file_end_revision);
-      if (status)
-        return svn_error_createf (status, NULL,
-                                  "failed to close file '%s'",
-                                  b->path_end_revision);
+      SVN_ERR (svn_io_file_close (b->file_start_revision, b->pool));
+      SVN_ERR (svn_io_file_close (b->file_end_revision, b->pool));
     }

   return SVN_NO_ERROR;


- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Julian Foad <ju...@btopenworld.com>.
Branko Čibej wrote:
> Erik Huelsmann wrote:
>>
>>My first revision of a patch for libsvn_client cf issue 897.
> 
> There are a few more things that could be done for consistency.
...
>     * Message texts
>           o Close-file errors:  "Failed to close file '%s'" vs. "Error
>             closing file '%s'"

How about I make the following addition so that most invocations of apr_file_close can be changed to SVN_ERR (svn_io_file_close) instead of being followed by manual construction of an error message?

- Julian


[[[
Add a wrapper around apr_file_close to allow more concise error handling.

The new function svn_io_file_close complements svn_io_file_open and returns
an svn_error_t so that errors can be dealt with by use of SVN_ERR rather than
by manual construction of an error message at each call site.

* subversion/include/svn_io.h
  (svn_io_file_close): New wrapper around apr_file_close.

* subversion/libsvn_subr/io.c
  (file_name_get): New helper function.
  (svn_stringbuf_from_aprfile): Use file_name_get.
  (svn_io_file_close): New function, also using file_name_get.
]]]

Index: subversion/include/svn_io.h
===================================================================
--- subversion/include/svn_io.h (revision 7646)
+++ subversion/include/svn_io.h (working copy)
@@ -636,6 +636,11 @@
                   apr_pool_t *pool);


+/** Wrapper for @c apr_file_close(), which see. */
+svn_error_t *
+svn_io_file_close (apr_file_t *file, apr_pool_t *pool);
+
+
 /** Wrapper for @c apr_stat(), which see.  @a fname is utf8-encoded. */
 svn_error_t *
 svn_io_stat (apr_finfo_t *finfo, const char *fname,
Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 7646)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -993,6 +993,28 @@
 }


+/* Get the name of FILE, or NULL if FILE is an unnamed stream. */
+static svn_error_t *
+file_name_get (const char **fname_utf8, apr_file_t *file, apr_pool_t *pool)
+{
+  apr_status_t apr_err;
+  const char *fname;
+
+  apr_err = apr_file_name_get (&fname, file);
+  if (apr_err)
+    return svn_error_create
+      (apr_err, NULL,
+       "failed to get file name from APR");
+
+  if (fname)
+    SVN_ERR (svn_path_cstring_to_utf8 (fname_utf8, fname, pool));
+  else
+    *fname_utf8 = NULL;
+
+  return SVN_NO_ERROR;
+}
+
+
 svn_error_t *
 svn_stringbuf_from_aprfile (svn_stringbuf_t **result,
                             apr_file_t *file,
@@ -1001,23 +1023,10 @@
   apr_size_t len;
   apr_status_t apr_err;
   svn_stringbuf_t *res = svn_stringbuf_create("", pool);
-  const char *fname;
   char buf[BUFSIZ];

   /* XXX: We should check the incoming data for being of type binary. */

-  apr_err = apr_file_name_get (&fname, file);
-  if (apr_err)
-    return svn_error_create
-      (apr_err, NULL,
-       "svn_stringbuf_from_aprfile: failed to get filename");
-
-  /* If the apr_file_t was opened with apr_file_open_std{in,out,err}, then we
-   * wont get a filename for it. We assume that since we are reading, that in
-   * this case we would only ever be using stdin.  */
-  if (NULL == fname)
-    fname = "stdin";
-
   /* apr_file_read will not return data and eof in the same call. So this loop
    * is safe from missing read data.  */
   len = sizeof(buf);
@@ -1033,9 +1042,14 @@
   if (!APR_STATUS_IS_EOF(apr_err))
     {
       const char *fname_utf8;
+      SVN_ERR (file_name_get (&fname_utf8, file, pool));

-      SVN_ERR (svn_path_cstring_to_utf8 (&fname_utf8, fname, pool));
-
+      /* If the apr_file_t was opened with apr_file_open_std{in,out,err}, then
+       * we won't get a filename for it. We assume that since we are reading,
+       * that in this case we would only ever be using stdin. */
+      if (NULL == fname_utf8)
+        fname_utf8 = "(stdin)";
+
       return svn_error_createf
         (apr_err, NULL,
          "svn_stringbuf_from_aprfile: EOF not seen for '%s'", fname_utf8);
@@ -1706,6 +1720,29 @@


 svn_error_t *
+svn_io_file_close (apr_file_t *file, apr_pool_t *pool)
+{
+  apr_status_t status;
+
+  status = apr_file_close (file);
+
+  if (status)
+    {
+      const char *fname_utf8;
+      SVN_ERR (file_name_get (&fname_utf8, file, pool));
+
+      if (NULL == fname_utf8)
+        fname_utf8 = "(stdin/out/err?)";
+
+      return svn_error_createf (status, NULL,
+                                "svn_io_file_close: can't close '%s'",
+                                fname_utf8);
+    }
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 svn_io_stat (apr_finfo_t *finfo, const char *fname,
              apr_int32_t wanted, apr_pool_t *pool)
 {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] issue #897: libsvn_client

Posted by Branko Čibej <br...@xbc.nu>.
Erik Huelsmann wrote:

>Hi!
>
>My first revision of a patch for libsvn_client cf issue 897.
>
>Comments?
>  
>
There are a few more things that could be done for consistency.

    * Qotes within error messages: '%s' vs. \"%s\". I think we meant to
      standardise on single quotes.
    * Message texts
          o Close-file errors:  "Failed to close file '%s'" vs. "Error
            closing file '%s'"
          o Unversioned resource errors: "'%s' is not under version
            control" vs. "'%s' not under version control" vs. "'%s' is
            not versioned". And we seem to be using two different error
            codes for these, SVN_ERR_WC_PATH_NOT_FOUND and
            SVN_ERR_ENTRY_NOT_FOUND

I don't know if fixing these inconsistencies was what you intended.


>Index: subversion/libsvn_client/export.c
>===================================================================
>--- subversion/libsvn_client/export.c	(revision 7644)
>+++ subversion/libsvn_client/export.c	(working copy)
>@@ -513,7 +513,7 @@
> 
>   apr_err = apr_file_close (fb->tmp_file);
>   if (apr_err)
>-    return svn_error_createf (apr_err, NULL, "error closing file '%s'",
>+    return svn_error_createf (apr_err, NULL, "Error closing file '%s'",
>                               fb->tmppath);
> 
>   if (text_checksum)
>@@ -525,7 +525,7 @@
>         {
>           return svn_error_createf
>             (SVN_ERR_CHECKSUM_MISMATCH, NULL,
>-             "close_file: checksum mismatch for resulting fulltext\n"
>+             "Checksum mismatch for resulting fulltext\n"
>              "(%s):\n"
>              "   expected checksum:  %s\n"
>              "   actual checksum:    %s\n",
>  
>
We shouldn't have multi-line error messages. They may be marginally
acceptable for the command-line client, but play badly with GUI clients.
Instead, we should create a chain of (wrapped) errors with the same
error code, but different message text.



-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org