User is not asked for Mercurial authentication information initially

Issue #650 closed
Ian Hinder created an issue

When running GetComponents without the "-a" (anonymous) option, the user is asked initially for authentication information for any authenticated repositories. However, the Carpet repository is not included in this list. This leads to the authentication prompt much later when Carpet is actually being checked out, and here it is not possible to say "anonymous". I believe the problem occurs on line 846 of GetComponents:

        # if AUTH_URL is defined we want to find the username:
        if (
            defined( $component->{AUTH_URL} )
            and (  $component->{TYPE} eq 'cvs'
                or $component->{TYPE} eq 'svn'
                or $component->{TYPE} eq 'darcs'
                or $component->{TYPE} eq 'git' )
          )
        {

where Mercurial (hg) is not included in that list. The attached (untested) patch adds hg to that list, but I don't know if this is sufficient to fix the problem.

Keyword:

Comments (8)

  1. Eric Seidel
    • removed comment

    I'll have to double check this, but I believe that GetComponents doesn't attempt to do any authentication for hg. It assumes (mistakenly) that hg and git will use ssh+key-based access for the AUTH_URL. The attached patch wouldn't help in this case, we'd have to add some actual logic to add the username/passwords to the hg call.

  2. Ian Hinder reporter
    • removed comment

    It's really the ability to check out anonymously that was missing here.

  3. Roland Haas
    • changed status to open
    • removed comment

    On danger of sounding silly (since we no longer have a mercurial repo in the toolkit): the patch looks ok. Please apply. Not having an anonymous checkout option would have been a different issue though I believe that this has also been cleaned up since this ticket was created (at least users without write permissions have supposedly been able to check out Carpet/hg before we switched back to git).

  4. Log in to comment