Re: [ANNOUNCE] GIT 1.6.4-rc2
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Jul 25, 2009, 19:22 UTC
- Message-ID
- <20090725192230.GA11510@dcvr.yhbt.net>
- In-Reply-To
- <1248529164.4593.8.camel@kea>
Mattias Nissler <mattias.nissler@gmx.de> wrote:
Show 28 quoted lines
> On Sat, 2009-07-25 at 03:38 -0700, Eric Wong wrote: > > Junio C Hamano <gitster@pobox.com> wrote: > > > Eric Wong <normalperson@yhbt.net> writes: > > > > Junio C Hamano <gitster@pobox.com> wrote: > > > >> * git-svn updates, including a new --authors-prog option to map author > > > >> names by invoking an external program, 'git svn reset' to unwind > > > >> 'git svn fetch', support for more than one branches, etc. > > > > > > > > I completely forgot the implications of a change made in commit > > > > 0b2af457a49e3b00d47d556d5301934d27909db8. This change probably doesn't > > > > affect a lot of repos out there, but --minimize-url is no longer the > > > > default for new imports. > > > > > > Let me know if the above made sense, it's late and I nodded off > > > > several times while writing this. > > > > > > Your description makes sense, and I suspect that the old default may be > > > easier to work with. > > > > Yes. I think the old default makes more sense, so I'll be reverting > > back to it. However, I'll make it possible to override from the > > command-line. > > Maybe we should rather try to detect whether we have read access to the > repository root and adjust behaviour accordingly? Or at least print a > warning when cloning restricted multi-branch repos, since this just > fails silently (doesn't pick up any branches) when you have minimize_url > enabled.
We actually try that in Git::SVN::Ra::minimize_url:
sub minimize_url {
my ($self) = @_;
return $self->{url} if ($self->{url} eq $self->{repos_root});
my $url = $self->{repos_root};
my @components = split(m!/!, $self->{svn_path});
my $c = '';
do {
$url .= "/$c" if length $c;
eval { (ref $self)->new($url)->get_latest_revnum };
} while ($@ && ($c = shift @components));
$url;
}Maybe get_latest_revnum() isn't strong enough of a check for certain setups and get_log() needs to be used instead?
-- Eric Wong