subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1737656 - /subversion/trunk/subversion/libsvn_subr/prompt.c
Date Mon, 04 Apr 2016 11:32:11 GMT
Author: danielsh
Date: Mon Apr  4 11:32:11 2016
New Revision: 1737656

URL: http://svn.apache.org/viewvc?rev=1737656&view=rev
Log:
* subversion/libsvn_subr/prompt.c
  (plaintext_prompt_helper): Simplify the code, in a backwards-compatible manner.

Thread: http://mid.gmane.org/CAEcU=1ZtytJOTRAQffW-2mLKV60BYUQHc2KibtCfebihRJ8NcA@mail.gmail.com

Modified:
    subversion/trunk/subversion/libsvn_subr/prompt.c

Modified: subversion/trunk/subversion/libsvn_subr/prompt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/prompt.c?rev=1737656&r1=1737655&r2=1737656&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/prompt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/prompt.c Mon Apr  4 11:32:11 2016
@@ -814,6 +814,8 @@ plaintext_prompt_helper(svn_boolean_t *m
   const char *config_path = NULL;
   terminal_handle_t *terminal;
 
+  *may_save_plaintext = FALSE; /* de facto API promise */
+
   if (pb)
     SVN_ERR(svn_config_get_user_config_path(&config_path, pb->config_dir,
                                             SVN_CONFIG_CATEGORY_SERVERS, pool));
@@ -826,17 +828,7 @@ plaintext_prompt_helper(svn_boolean_t *m
 
   do
     {
-      svn_error_t *err = prompt(&answer, prompt_string, FALSE, pb, pool);
-      if (err)
-        {
-          if (err->apr_err == SVN_ERR_CANCELLED)
-            {
-              *may_save_plaintext = FALSE;
-              return err;
-            }
-          else
-            return err;
-        }
+      SVN_ERR(prompt(&answer, prompt_string, FALSE, pb, pool));
       if (apr_strnatcasecmp(answer, _("yes")) == 0 ||
           apr_strnatcasecmp(answer, _("y")) == 0)
         {



Mime
View raw message