[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Fix wrapping of 'svn help' output at 80 chars

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Sun, 1 Dec 2019 11:49:27 -0500

I noticed that the first line of output of 'svn help' doesn't fit in a
terminal width of 80 characters for:

svn help changelist
svn help cleanup
svn help switch

Even though the strings do fit in 80 characters, this happens because
the name of the command (and any aliases) are prepended to the first
line, making it longer than apparent in the code.

So the following string:

"Either recover from an interrupted operation that left the working copy
locked,\n"
"or remove unwanted files.\n"

Displays like this when 'svn help cleanup' is run in a terminal 80
chars wide:

cleanup: Either recover from an interrupted operation that left the working
copy
 locked,
or remove unwanted files.

Patch below...

I didn't commit this yet because it affects translations. When
modifying strings, do I need to modify the po files in the same
commit?

[[[

Index: subversion/svn/svn.c
===================================================================
--- subversion/svn/svn.c (revision 1870686)
+++ subversion/svn/svn.c (working copy)
@@ -636,7 +636,8 @@
     {'r', opt_ignore_keywords} },

   { "changelist", svn_cl__changelist, {"cl"}, {N_(
- "Associate (or dissociate) changelist CLNAME with the named files.\n"
+ "Associate (or dissociate) changelist CLNAME with the named\n"
+ "files.\n"
      "usage: 1. changelist CLNAME PATH...\n"
      " 2. changelist --remove PATH...\n"
     )},
@@ -672,8 +673,8 @@
     {{'N', N_("obsolete; same as --depth=files")}} },

   { "cleanup", svn_cl__cleanup, {0}, {N_(
- "Either recover from an interrupted operation that left the working
copy locked,\n"
- "or remove unwanted files.\n"
+ "Either recover from an interrupted operation that left the working
copy\n"
+ "locked, or remove unwanted files.\n"
      "usage: 1. cleanup [WCPATH...]\n"
      " 2. cleanup --remove-unversioned [WCPATH...]\n"
      " cleanup --remove-ignored [WCPATH...]\n"
@@ -1875,7 +1876,8 @@
      {'N', N_("obsolete; same as --depth=immediates")}} },

   { "switch", svn_cl__switch, {"sw"}, {N_(
- "Update the working copy to a different URL within the same
repository.\n"
+ "Update the working copy to a different URL within the same\n"
+ "repository.\n"
      "usage: 1. switch URL[@PEGREV] [PATH]\n"
      " 2. switch --relocate FROM-PREFIX TO-PREFIX [PATH...]\n"
      "\n"), N_(

]]]

Nathan
Received on 2019-12-01 17:49:50 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.