For SmartSVN, we are looking for a way to support multiple credentials (username and password) for the same realm. When using the command line client, --username will do the job, however this option is not well suited for a GUI client. Here, a quite flexible as well as intuitive approach would be to support the user@-specification as part of the URL. To be able to implement that, I'd suggest to extend JavaHL in either of the following ways:
(A) UserPasswordCallback.prompt(String realm, String username) should give the user@-user from the requested URL as the default "username", if present. Hence, precedence for this default would be: (a) ISVNClient.username() (--username-option) (2) "user@" from URL (3) system user (as currently) (B) rework UserPasswordCallback to include the accessed URL, like: UserPasswordCallback.prompt(String realm, String username, String url) (B) will allow to parse the user@ from the specified URL and has the additional advantage that the credentials prompt will also be able to display for which URL credentials are required. This can be helpful to design a clearer "Login" dialog. Taken as a whole, I'd appreciate a more general review of UserPasswordCallback which is currently hard to implement for a GUI client: e.g. to provide better support for SSL, more specific methods than askQuestion with a single String-parameter would be needed. I can post a proposal, if this will be helpful. Thanks for your consideration. -Marc