s...@apache.org wrote on Thu, Jul 11, 2013 at 09:22:46 -0000: > Author: stsp > Date: Thu Jul 11 09:22:45 2013 > New Revision: 1502163 > > URL: http://svn.apache.org/r1502163 > Log: > In svnauth, label simple credential fields with translatable strings. > > * subversion/svnauth/svnauth.c > (AUTHN_USERNAME_KEY, AUTHN_PASSWORD_KEY, AUTHN_PASSTYPE_KEY): New macros, > copied from libsvn_subr/simple_providers.c (at some point we'll have > to move all these AUTHN_* macros into a shared header file). > (list_credentials): Pretty-print simple credentials. > > Modified: > subversion/trunk/subversion/svnauth/svnauth.c > > Modified: subversion/trunk/subversion/svnauth/svnauth.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/svnauth/svnauth.c?rev=1502163&r1=1502162&r2=1502163&view=diff > ============================================================================== > --- subversion/trunk/subversion/svnauth/svnauth.c (original) > +++ subversion/trunk/subversion/svnauth/svnauth.c Thu Jul 11 09:22:45 2013 > @@ -422,6 +422,11 @@ show_cert_failures(const char *failure_s > return SVN_NO_ERROR; > } > > +/* ### from libsvn_subr/simple_providers.c */ > +#define AUTHN_USERNAME_KEY "username" > +#define AUTHN_PASSWORD_KEY "password" > +#define AUTHN_PASSTYPE_KEY "passtype" > + > /* This implements `svn_config_auth_walk_func_t` */ > static svn_error_t * > list_credentials(svn_boolean_t *delete_cred, > @@ -457,10 +462,21 @@ list_credentials(svn_boolean_t *delete_c > item = APR_ARRAY_IDX(sorted_hash_items, i, svn_sort__item_t); > key = item.key; > value = item.value; > - if (!opt_state->show_passwords && strcmp(key, "password") == 0) > - SVN_ERR(svn_cmdline_printf(iterpool, _("%s: [not shown]\n"), key)); > - else if (strcmp(value->data, realmstring) == 0) > + if (strcmp(value->data, realmstring) == 0) > continue; /* realm string was already shown above */ > + else if (strcmp(key, AUTHN_PASSWORD_KEY) == 0) > + { > + if (opt_state->show_passwords) > + SVN_ERR(svn_cmdline_printf(iterpool, _("Password: %s\n"), > + value->data)); > + else > + SVN_ERR(svn_cmdline_printf(iterpool, _("Password: [not > shown]\n"))); > + }
Have you tested this on windows? IIRC, when the 'wincrypt' provider is used, the svn.simple/$(md5 realm) files to contain a 'password' key, which contains some base64'd ciphertext --- i.e., a value which would not be useful to print.