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

[PATCH] Make h and ? work at the conflict prompt

From: Mattias Engdegård <mattiase_at_bredband.net>
Date: Fri, 19 Apr 2013 20:43:03 +0200

The conflict help text says

   (s) - show this list (also 'h', '?')

but h and ? don't actually work. Here is a patch.

[[[
Make "h" and "?" work at the conflict prompt as promised by the help
text.

* subversion/svn/conflict-callbacks.c
   (prompt_user): Test for "h" and "?" before calling find_option,
    not after.
]]]

Index: subversion/svn/conflict-callbacks.c
===================================================================
--- subversion/svn/conflict-callbacks.c (revision 1469957)
+++ subversion/svn/conflict-callbacks.c (working copy)
@@ -575,20 +575,22 @@
   const char *answer;
 
   SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, prompt_baton, scratch_pool));
- *opt = find_option(conflict_options, answer);
-
- if (! *opt)
+ if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
     {
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
- _("Unrecognized option.\n\n")));
- }
- else if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
- {
       SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
                                   help_string(conflict_options,
                                               scratch_pool)));
       *opt = NULL;
     }
+ else
+ {
+ *opt = find_option(conflict_options, answer);
+ if (! *opt)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ _("Unrecognized option.\n\n")));
+ }
+ }
   return SVN_NO_ERROR;
 }
 

Received on 2013-04-19 20:43:41 CEST

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