Re: git-svn: Fetch svn branches only and have git recognize them as branches?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Koehmstedt <bkoehmstedt@xxxxxxxxxxxx> writes:

> I'm trying deal with a project where the server is disallowing access to
> the root URL on the subversion server.
>
> i.e.,
> Doesn't allow access: http://abc.com/repo
> Does allow access: http://abc.com/repo/trunk, http://abc.com/repo/branches,
> http://abc.com/repo/tags

[warning: I have never used 'git svn' myself for several years]

The problem sounds like what this commit (which is v1.5.1.5~15)
fixed:

commit 4a1bb4c3f87f355dd52fcd0babcbd005d59d7ed6
Author: Eric Wong <normalperson@xxxxxxxx>
Date:   Sun May 13 09:58:14 2007 -0700

    git-svn: don't attempt to minimize URLs by default
    
    For tracking branches and tags, git-svn prefers to connect
    to the root of the repository or at least the level that
    houses branches and tags as well as trunk.  However, users
    that are accustomed to tracking a single directory have
    no use for this feature.
    
    As pointed out by Junio, users may not have permissions to
    connect to connect to a higher-level path in the repository.
    
    While the current minimize_url() function detects lack of
    permissions to certain paths _after_ successful logins, it
    cannot effectively determine if it is trying to access a
    login-only portion of a repo when the user expects to
    connect to a part where anonymous access is allowed.
    
    For people used to the git-svnimport switches of
    --trunk, --tags, --branches, they'll already pass the
    repository root (or root+subdirectory), so minimize URL
    isn't of too much use to them, either.
    
    For people *not* used to git-svnimport, git-svn also
    supports:
    
     git svn init --minimize-url \
      --trunk http://repository-root/foo/trunk \
      --branches http://repository-root/foo/branches \
      --tags http://repository-root/foo/tags
    
    And this is where the new --minimize-url command-line switch
    comes in to allow for this behavior to continue working.

The description of the commit makes me think that mimicking the
sample command line without minimize-url ought to work, i.e.

    git svn init \
        --trunk    http://abc.com/repo/trunk \
        --branches http://abc.com/repo/branches \
        --tags     http://abc.com/repo/tags

But I've never used 'git svn' for several years, so I may be
completely off the mark.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]