Tim Ringenbach <tim.ringenb...@gmail.com> wrote:
> Hi,
> 
> 'git svn dcommit' doesn't seem to honor the --username argument when
> my svn repository url is a file:/// url.  It doesn't complain either,
> it just seems to silently ignore the option. My dcommits show up as
> the user I'm logged in as. The only way I found to change that is to
> 'sudo' to some other user.
> 
> The actual 'svn' command does support --username with 'svn commit'.

Interesting, I didn't know --username would be handled with
file:// at all by svn(1).  I don't think we do anything special
depending on the URL scheme for auth, either.

I took a quick look at the svn(1) code
(subversion/svn/svn.c in git://git.apache.org/subversion.git)
but didn't see anything jump out at me (I'm not really familiar
with that code, either).

Totally untested, but does flipping the order of auth providers
help at all?

diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index e764696..c6ce247 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -43,6 +43,7 @@ END {
 sub _auth_providers () {
        require SVN::Client;
        my @rv = (
+         SVN::Client::get_username_provider(),
          SVN::Client::get_simple_provider(),
          SVN::Client::get_ssl_server_trust_file_provider(),
          SVN::Client::get_simple_prompt_provider(
@@ -53,7 +54,6 @@ sub _auth_providers () {
          SVN::Client::get_ssl_client_cert_pw_file_provider(),
          SVN::Client::get_ssl_client_cert_pw_prompt_provider(
            \&Git::SVN::Prompt::ssl_client_cert_pw, 2),
-         SVN::Client::get_username_provider(),
          SVN::Client::get_ssl_server_trust_prompt_provider(
            \&Git::SVN::Prompt::ssl_server_trust),
          SVN::Client::get_username_prompt_provider(


(I'm not sure if it breaks other things, either).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to