subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1346077 - /subversion/trunk/subversion/libsvn_ra_svn/client.c
Date Mon, 04 Jun 2012 18:29:53 GMT
Author: stefan2
Date: Mon Jun  4 18:29:53 2012
New Revision: 1346077

URL: http://svn.apache.org/viewvc?rev=1346077&view=rev
Log:
Minor svn: latency improvement: call dcgettext for error messages
only if an error actually occurred.

* subversion/libsvn_ra_svn/client.c
  (handle_unsupported_cmd): translate message here ...
  (ra_svn_stat, ra_svn_get_locations, ra_svn_get_location_segments,
   ra_svn_get_file_revs, ra_svn_lock_compat, ra_svn_unlock_compat,
   ra_svn_get_lock, ra_svn_get_locks, ra_svn_replay,
   ra_svn_replay_range, ra_svn_get_deleted_rev): ... instead of here

Modified:
    subversion/trunk/subversion/libsvn_ra_svn/client.c

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1346077&r1=1346076&r2=1346077&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Mon Jun  4 18:29:53 2012
@@ -1582,7 +1582,7 @@ static svn_error_t *handle_unsupported_c
 {
   if (err && err->apr_err == SVN_ERR_RA_SVN_UNKNOWN_CMD)
     return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err,
-                            msg);
+                            _(msg));
   return err;
 }
 
@@ -1599,8 +1599,7 @@ static svn_error_t *ra_svn_stat(svn_ra_s
   SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "stat", "c(?r)", path, rev));
 
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
-                                 _("'stat' not implemented")));
-
+                                 "'stat' not implemented"));
   SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "(?l)", &list));
 
   if (! list)
@@ -1659,7 +1658,7 @@ static svn_error_t *ra_svn_get_locations
 
   /* Servers before 1.1 don't support this command. Check for this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
-                                 _("'get-locations' not implemented")));
+                                 "'get-locations' not implemented"));
 
   /* Read the hash items. */
   is_done = FALSE;
@@ -1713,7 +1712,7 @@ ra_svn_get_location_segments(svn_ra_sess
 
   /* Servers before 1.5 don't support this command. Check for this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
-                                 _("'get-location-segments' not implemented")));
+                                 "'get-location-segments' not implemented"));
 
   /* Parse the response. */
   is_done = FALSE;
@@ -1780,7 +1779,7 @@ static svn_error_t *ra_svn_get_file_revs
 
   /* Servers before 1.1 don't support this command.  Check for this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
-                                 _("'get-file-revs' not implemented")));
+                                 "'get-file-revs' not implemented"));
 
   while (1)
     {
@@ -1911,8 +1910,8 @@ static svn_error_t *ra_svn_lock_compat(s
 
       /* Servers before 1.2 doesn't support locking.  Check this here. */
       SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
-                                     _("Server doesn't support "
-                                       "the lock command")));
+                                     "Server doesn't support "
+                                     "the lock command"));
 
       err = svn_ra_svn_read_cmd_response(conn, iterpool, "l", &list);
 
@@ -1975,8 +1974,8 @@ static svn_error_t *ra_svn_unlock_compat
 
       /* Servers before 1.2 don't support locking.  Check this here. */
       SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, iterpool),
-                                     _("Server doesn't support the unlock "
-                                       "command")));
+                                     "Server doesn't support the unlock "
+                                     "command"));
 
       err = svn_ra_svn_read_cmd_response(conn, iterpool, "");
 
@@ -2262,8 +2261,8 @@ static svn_error_t *ra_svn_get_lock(svn_
 
   /* Servers before 1.2 doesn't support locking.  Check this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
-                                 _("Server doesn't support the get-lock "
-                                   "command")));
+                                 "Server doesn't support the get-lock "
+                                 "command"));
 
   SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "(?l)", &list));
   if (list)
@@ -2315,8 +2314,8 @@ static svn_error_t *ra_svn_get_locks(svn
 
   /* Servers before 1.2 doesn't support locking.  Check this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
-                                 _("Server doesn't support the get-lock "
-                                   "command")));
+                                 "Server doesn't support the get-lock "
+                                 "command"));
 
   SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "l", &list));
 
@@ -2372,8 +2371,8 @@ static svn_error_t *ra_svn_replay(svn_ra
                                low_water_mark, send_deltas));
 
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
-                                 _("Server doesn't support the replay "
-                                   "command")));
+                                 "Server doesn't support the replay "
+                                 "command"));
 
   SVN_ERR(svn_ra_svn_drive_editor2(sess->conn, pool, editor, edit_baton,
                                    NULL, TRUE));
@@ -2403,8 +2402,8 @@ ra_svn_replay_range(svn_ra_session_t *se
                                low_water_mark, send_deltas));
 
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
-                                 _("Server doesn't support the replay-range "
-                                   "command")));
+                                 "Server doesn't support the replay-range "
+                                 "command"));
 
   iterpool = svn_pool_create(pool);
   for (rev = start_revision; rev <= end_revision; rev++)
@@ -2502,7 +2501,7 @@ ra_svn_get_deleted_rev(svn_ra_session_t 
 
   /* Servers before 1.6 don't support this command.  Check for this here. */
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
-                                 _("'get-deleted-rev' not implemented")));
+                                 "'get-deleted-rev' not implemented"));
 
   return svn_ra_svn_read_cmd_response(conn, pool, "r", revision_deleted);
 }



Mime
View raw message