Hi,
From: Julian Foad <julianfoad@btopenworld.com>
Subject: Re: [PATCH] Message cleanups.
Date: Fri, 01 Apr 2005 14:07:59 +0100
> > Index: subversion/svnadmin/main.c
> > ===================================================================
> > --- subversion/svnadmin/main.c (revision 13800)
> > +++ subversion/svnadmin/main.c (working copy)
> > - SVN_ERR (svn_cmdline_printf (pool, _("Comment (%i %s):\n%s\n\n"),
> > + SVN_ERR (svn_cmdline_printf (pool, _("Comment (%i %s):\n%s\n"),
>
> The extra newline there was required to separate the descriptions of multiple
> locks, so please re-insert it.
>
>
> Everything else looks good.
Thanks for reviewing.
I fixed.
Also I made a little change in that area (subversion/svnadmin/main.c) and
subversion/svnlook/main.c for consistency with another patch
([PATCH] Make a string localizable), since it was relevant.
Thanks,
- nori
Log:
Clean up messages, i.e. unify some messages and message formats.
Also, mark up one message for translation.
* subversion/clients/cmdline/main.c: Insert a period into a help
message because it should be there.
* subversion/include/svn_error_codes.h: Replace "out-of-date" by
"out of date" for consistency with a similar message in the same file.
* subversion/libsvn_fs_base/bdb/reps-table.c: Quote "next-key" for
consistency with messages containing the word in
libsvn_fs_base/bdb/copies-table.c and libsvn_fs_base/bdb/nodes-table.c.
* subversion/libsvn_fs_fs/fs_fs.c: Insert "is" into "Transaction out of
date" for consistency with a similar message in
include/svn_error_codes.h.
* subversion/libsvn_repos/commit.c: Replace "Path '%s' not present" by
"Path '%s' does not exist" for consistency with
libsvn_client/commit.c, libsvn_client/copy.c, and svnlook/main.c.
* subversion/libsvn_repos/load.c: Make messages showing working state
such as " * editing path : %s ..." and " done.\n" similar to
"Deltifying revision %ld..." and "done.\n" in svnadmin/main.c.
* subversion/libsvn_wc/entries.c: Remove a colon from "No such entry:
'%s'" for consistency with other messages beginning with "No such".
* subversion/svnlook/main.c: Check off the last newline from "Repository
argument required\n" for consistency with a similar message in
subversion/svnadmin/main.c. Also mark a message for translation.
* subversion/svnserve/main.c: Decapitalize "Usage" in the help message
for consistency with other commands' help messages.
* subversion/svnadmin/main.c:
* subversion/svnlook/main.c:
Check off the last newline from "Comment (%i %s):\n%s\n\n" in
subversion/svnadmin/main.c for consistency with a similar message in
subversion/svnlook/main.c. Then, replace the first "%s" by
"lines"/"line" in both files, for consistency with another patch by
Marcel Gosselin <marcel.gosselin@polymtl.ca> to localize a string in
subversion/clients/cmdline/info-cmd.c.
* subversion/libsvn_client/export.c:
* subversion/libsvn_fs_base/dag.c:
* subversion/libsvn_fs_base/reps-strings.c:
* subversion/libsvn_fs_base/tree.c:
* subversion/libsvn_fs_fs/dag.c:
* subversion/libsvn_fs_fs/tree.c:
* subversion/libsvn_ra_dav/fetch.c:
* subversion/libsvn_ra_svn/client.c:
* subversion/libsvn_repos/commit.c:
* subversion/libsvn_wc/adm_crawler.c:
* subversion/libsvn_wc/update_editor.c:
Unify the format of messages for "Checksum mismatch".
Index: subversion/libsvn_fs_base/tree.c
===================================================================
--- subversion/libsvn_fs_base/tree.c (revision 13824)
+++ subversion/libsvn_fs_base/tree.c (working copy)
@@ -3681,7 +3681,7 @@
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH,
NULL,
- _("Base checksum mismatch on '%s':\n"
+ _("Base checksum mismatch for '%s':\n"
" expected: %s\n"
" actual: %s\n"),
tb->path, tb->base_checksum, hex);
Index: subversion/libsvn_fs_base/reps-strings.c
===================================================================
--- subversion/libsvn_fs_base/reps-strings.c (revision 13824)
+++ subversion/libsvn_fs_base/reps-strings.c (working copy)
@@ -787,9 +787,10 @@
if (! svn_md5_digests_match (checksum, rep->checksum))
return svn_error_createf
(SVN_ERR_FS_CORRUPT, NULL,
- _("Checksum mismatch on rep '%s':\n"
+ _("Checksum mismatch for rep '%s':\n"
" expected: %s\n"
- " actual: %s\n"), rep_key,
+ " actual: %s\n"),
+ rep_key,
svn_md5_digest_to_cstring (rep->checksum, pool),
svn_md5_digest_to_cstring (checksum, pool));
}
@@ -873,9 +874,10 @@
if (! svn_md5_digests_match (checksum, rep->checksum))
return svn_error_createf
(SVN_ERR_FS_CORRUPT, NULL,
- _("Checksum mismatch on rep '%s':\n"
+ _("Checksum mismatch for rep '%s':\n"
" expected: %s\n"
- " actual: %s\n"), args->rb->rep_key,
+ " actual: %s\n"),
+ args->rb->rep_key,
svn_md5_digest_to_cstring (rep->checksum, trail->pool),
svn_md5_digest_to_cstring (checksum, trail->pool));
}
Index: subversion/libsvn_fs_base/bdb/reps-table.c
===================================================================
--- subversion/libsvn_fs_base/bdb/reps-table.c (revision 13824)
+++ subversion/libsvn_fs_base/bdb/reps-table.c (working copy)
@@ -153,7 +153,7 @@
/* Get the current value associated with `next-key'. */
svn_fs_base__str_to_dbt (&query, NEXT_KEY_KEY);
svn_fs_base__trail_debug (trail, "representations", "get");
- SVN_ERR (BDB_WRAP (fs, _("allocating new representation (getting next-key)"),
+ SVN_ERR (BDB_WRAP (fs, _("allocating new representation (getting 'next-key')"),
bfd->representations->get
(bfd->representations, trail->db_txn, &query,
svn_fs_base__result_dbt (&result), 0)));
Index: subversion/libsvn_fs_base/dag.c
===================================================================
--- subversion/libsvn_fs_base/dag.c (revision 13824)
+++ subversion/libsvn_fs_base/dag.c (working copy)
@@ -1328,7 +1328,7 @@
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH,
NULL,
- _("Checksum mismatch, rep '%s':\n"
+ _("Checksum mismatch for rep '%s':\n"
" expected: %s\n"
" actual: %s\n"),
noderev->edit_key, checksum, hex);
Index: subversion/svnadmin/main.c
===================================================================
--- subversion/svnadmin/main.c (revision 13824)
+++ subversion/svnadmin/main.c (working copy)
@@ -1029,10 +1029,13 @@
SVN_ERR (svn_cmdline_printf (pool, _("Owner: %s\n"), lock->owner));
SVN_ERR (svn_cmdline_printf (pool, _("Created: %s\n"), cr_date));
SVN_ERR (svn_cmdline_printf (pool, _("Expires: %s\n"), exp_date));
- SVN_ERR (svn_cmdline_printf (pool, _("Comment (%i %s):\n%s\n\n"),
+ SVN_ERR (svn_cmdline_printf (pool,
+ (comment_lines != 1)
+ ? _("Comment (%i lines):\n%s\n")
+ : _("Comment (%i line):\n%s\n"),
comment_lines,
- (comment_lines > 1) ? "lines" : "line",
lock->comment ? lock->comment : ""));
+ SVN_ERR (svn_cmdline_printf (pool, "\n"));
}
return SVN_NO_ERROR;
Index: subversion/include/svn_error_codes.h
===================================================================
--- subversion/include/svn_error_codes.h (revision 13824)
+++ subversion/include/svn_error_codes.h (working copy)
@@ -643,7 +643,7 @@
SVN_ERRDEF (SVN_ERR_RA_OUT_OF_DATE,
SVN_ERR_RA_CATEGORY_START + 4,
- "Item is out-of-date")
+ "Item is out of date")
SVN_ERRDEF (SVN_ERR_RA_NO_REPOS_UUID,
SVN_ERR_RA_CATEGORY_START + 5,
Index: subversion/libsvn_wc/entries.c
===================================================================
--- subversion/libsvn_wc/entries.c (revision 13824)
+++ subversion/libsvn_wc/entries.c (working copy)
@@ -1755,7 +1755,7 @@
entry = apr_hash_get (entries, name, APR_HASH_KEY_STRING);
if (! entry)
return svn_error_createf (SVN_ERR_ENTRY_NOT_FOUND, NULL,
- _("No such entry: '%s'"), name);
+ _("No such entry '%s'"), name);
if (new_url != NULL
&& (! entry->url || strcmp (new_url, entry->url)))
Index: subversion/libsvn_wc/adm_crawler.c
===================================================================
--- subversion/libsvn_wc/adm_crawler.c (revision 13824)
+++ subversion/libsvn_wc/adm_crawler.c (working copy)
@@ -817,8 +817,9 @@
return svn_error_createf
(SVN_ERR_WC_CORRUPT_TEXT_BASE, NULL,
- _("Checksum mismatch for '%s'; "
- "expected '%s', actual: '%s'"),
+ _("Checksum mismatch for '%s':\n"
+ " expected: %s\n"
+ " actual: %s\n"),
svn_path_local_style (tb, pool),
ent->checksum, base_digest_hex);
}
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 13824)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -1608,7 +1608,9 @@
if (strcmp (hex_digest, base_checksum) != 0)
return svn_error_createf
(SVN_ERR_WC_CORRUPT_TEXT_BASE, NULL,
- _("Checksum mismatch for '%s'; expected: '%s', actual: '%s'"),
+ _("Checksum mismatch for '%s':\n"
+ " expected: %s\n"
+ " actual: %s\n"),
svn_path_local_style (tb, pool), base_checksum, hex_digest);
}
@@ -1625,7 +1627,9 @@
{
return svn_error_createf
(SVN_ERR_WC_CORRUPT_TEXT_BASE, NULL,
- _("Checksum mismatch for '%s'; recorded: '%s', actual: '%s'"),
+ _("Checksum mismatch for '%s':\n"
+ " recorded: %s\n"
+ " actual: %s\n"),
svn_path_local_style (tb, pool), ent->checksum, hex_digest);
}
}
@@ -2379,7 +2383,9 @@
if (real_sum && (strcmp (text_checksum, real_sum) != 0))
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH, NULL,
- _("Checksum mismatch for '%s'; expected: '%s', actual: '%s'"),
+ _("Checksum mismatch for '%s':\n"
+ " expected: %s\n"
+ " actual: %s\n"),
svn_path_local_style (fb->path, pool), text_checksum, real_sum);
}
}
Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c (revision 13824)
+++ subversion/libsvn_client/export.c (working copy)
@@ -683,7 +683,9 @@
{
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH, NULL,
- _("Checksum mismatch for '%s'; expected: '%s', actual: '%s'"),
+ _("Checksum mismatch for '%s':\n"
+ " expected: %s\n"
+ " actual: %s\n"),
svn_path_local_style (fb->path, pool),
text_checksum, actual_checksum);
}
Index: subversion/svnlook/main.c
===================================================================
--- subversion/svnlook/main.c (revision 13824)
+++ subversion/svnlook/main.c (working copy)
@@ -741,7 +741,7 @@
{
int i;
- SVN_ERR (svn_cmdline_printf (pool, "\nProperty changes on: %s\n%s\n",
+ SVN_ERR (svn_cmdline_printf (pool, _("\nProperty changes on: %s\n%s\n"),
path, under_string));
for (i = 0; i < prop_diffs->nelts; i++)
@@ -1775,9 +1775,11 @@
SVN_ERR (svn_cmdline_printf (pool, _("Owner: %s\n"), lock->owner));
SVN_ERR (svn_cmdline_printf (pool, _("Created: %s\n"), cr_date));
SVN_ERR (svn_cmdline_printf (pool, _("Expires: %s\n"), exp_date));
- SVN_ERR (svn_cmdline_printf (pool, _("Comment (%i %s):\n%s\n"),
+ SVN_ERR (svn_cmdline_printf (pool,
+ (comment_lines != 1)
+ ? _("Comment (%i lines):\n%s\n")
+ : _("Comment (%i line):\n%s\n"),
comment_lines,
- (comment_lines > 1) ? "lines" : "line",
lock->comment ? lock->comment : ""));
}
@@ -2107,7 +2109,9 @@
{
svn_error_clear
(svn_cmdline_fprintf (stderr, pool,
- _("Repository argument required\n")));
+ _("Repository argument required")));
+ svn_error_clear
+ (svn_cmdline_fprintf (stderr, pool, "\n"));
subcommand_help (NULL, NULL, pool);
svn_pool_destroy (pool);
return EXIT_FAILURE;
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c (revision 13824)
+++ subversion/clients/cmdline/main.c (working copy)
@@ -354,7 +354,7 @@
N_("Display information about a local or remote item.\n"
"usage: info [PATH...]\n"
"\n"
- " Print information about each PATH (default: '.')\n"
+ " Print information about each PATH (default: '.').\n"
" PATH may be either a working-copy path or URL.\n"),
{'r', 'R', svn_cl__targets_opt, svn_cl__config_dir_opt} },
Index: subversion/libsvn_repos/load.c
===================================================================
--- subversion/libsvn_repos/load.c (revision 13824)
+++ subversion/libsvn_repos/load.c (working copy)
@@ -992,14 +992,14 @@
case svn_node_action_change:
{
SVN_ERR (svn_stream_printf (pb->outstream, pool,
- _(" * editing path : %s ..."),
+ _(" * Editing path '%s'..."),
nb->path));
break;
}
case svn_node_action_delete:
{
SVN_ERR (svn_stream_printf (pb->outstream, pool,
- _(" * deleting path : %s ..."),
+ _(" * Deleting path '%s'..."),
nb->path));
SVN_ERR (svn_fs_delete (rb->txn_root, nb->path, pool));
break;
@@ -1007,7 +1007,7 @@
case svn_node_action_add:
{
SVN_ERR (svn_stream_printf (pb->outstream, pool,
- _(" * adding path : %s ..."),
+ _(" * Adding path '%s'..."),
nb->path));
SVN_ERR (maybe_add_with_history (nb, rb, pool));
@@ -1016,7 +1016,7 @@
case svn_node_action_replace:
{
SVN_ERR (svn_stream_printf (pb->outstream, pool,
- _(" * replacing path : %s ..."),
+ _(" * Replacing path '%s'..."),
nb->path));
SVN_ERR (svn_fs_delete (rb->txn_root, nb->path, pool));
@@ -1162,7 +1162,7 @@
struct parse_baton *pb = rb->pb;
apr_size_t len = 7;
- SVN_ERR (svn_stream_write (pb->outstream, _(" done.\n"), &len));
+ SVN_ERR (svn_stream_write (pb->outstream, _("done.\n"), &len));
return SVN_NO_ERROR;
}
Index: subversion/libsvn_repos/commit.c
===================================================================
--- subversion/libsvn_repos/commit.c (revision 13824)
+++ subversion/libsvn_repos/commit.c (working copy)
@@ -321,11 +321,11 @@
const char *full_path = svn_path_join (eb->base_path, path, pool);
/* Check PATH in our transaction. If it does not exist,
- return a 'Path not present' error. */
+ return a 'Path does not exist' error. */
SVN_ERR (svn_fs_check_path (&kind, eb->txn_root, full_path, pool));
if (kind == svn_node_none)
return svn_error_createf (SVN_ERR_FS_NOT_DIRECTORY, NULL,
- _("Path '%s' not present"),
+ _("Path '%s' does not exist"),
path);
/* Build a new dir baton for this directory */
@@ -511,8 +511,8 @@
(SVN_ERR_CHECKSUM_MISMATCH, NULL,
_("Checksum mismatch for resulting fulltext\n"
"(%s):\n"
- " expected checksum: %s\n"
- " actual checksum: %s\n"),
+ " expected: %s\n"
+ " actual: %s\n"),
fb->path, text_checksum, hex_digest);
}
}
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c (revision 13824)
+++ subversion/libsvn_ra_svn/client.c (working copy)
@@ -908,8 +908,8 @@
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH, NULL,
_("Checksum mismatch for '%s':\n"
- " expected checksum: %s\n"
- " actual checksum: %s\n"),
+ " expected: %s\n"
+ " actual: %s\n"),
path, expected_checksum, hex_digest);
}
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c (revision 13824)
+++ subversion/libsvn_ra_dav/fetch.c (working copy)
@@ -842,8 +842,8 @@
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH, NULL,
_("Checksum mismatch for '%s':\n"
- " expected checksum: %s\n"
- " actual checksum: %s\n"),
+ " expected: %s\n"
+ " actual: %s\n"),
path, expected_checksum->data, hex_digest);
}
}
Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 13824)
+++ subversion/svnserve/main.c (working copy)
@@ -137,7 +137,7 @@
{
apr_size_t i;
- svn_error_clear(svn_cmdline_fputs(_("Usage: svnserve [options]\n"
+ svn_error_clear(svn_cmdline_fputs(_("usage: svnserve [options]\n"
"\n"
"Valid options:\n"),
stdout, pool));
Index: subversion/libsvn_fs_fs/tree.c
===================================================================
--- subversion/libsvn_fs_fs/tree.c (revision 13824)
+++ subversion/libsvn_fs_fs/tree.c (working copy)
@@ -2350,7 +2350,7 @@
return svn_error_createf
(SVN_ERR_CHECKSUM_MISMATCH,
NULL,
- _("Base checksum mismatch on '%s':\n"
+ _("Base checksum mismatch for '%s':\n"
" expected: %s\n"
" actual: %s\n"),
tb->path, tb->base_checksum, hex);
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 13824)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -3762,7 +3762,7 @@
{
svn_pool_destroy (subpool);
return svn_error_create (SVN_ERR_FS_TXN_OUT_OF_DATE, NULL,
- _("Transaction out of date"));
+ _("Transaction is out of date"));
}
/* Locks may have been added (or stolen) between the calling of
Index: subversion/libsvn_fs_fs/dag.c
===================================================================
--- subversion/libsvn_fs_fs/dag.c (revision 13824)
+++ subversion/libsvn_fs_fs/dag.c (working copy)
@@ -949,7 +949,7 @@
hex = svn_md5_digest_to_cstring (digest, pool);
if (strcmp (checksum, hex) != 0)
return svn_error_createf (SVN_ERR_CHECKSUM_MISMATCH, NULL,
- _("Checksum mismatch, file '%s':\n"
+ _("Checksum mismatch for file '%s':\n"
" expected: %s\n"
" actual: %s\n"),
file->created_path, checksum, hex);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 1 16:07:34 2005