summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2da9ee0)
raw | patch | inline | side by side (parent: 2da9ee0)
author | Eric Wong <normalperson@yhbt.net> | |
Sat, 25 Jul 2009 07:00:50 +0000 (00:00 -0700) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Sat, 25 Jul 2009 11:09:43 +0000 (04:09 -0700) |
This reverts the --minimize-url behavior change that
appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8
("Fix branch detection when repository root is inaccessible").
However, we now allow the option to be turned off by allowing
"--no-minimize-url" so people with limited-access setups can
still take advantage of the fix in
0b2af457a49e3b00d47d556d5301934d27909db8.
Also document the behavior and default settings of minimize-url
in the manpage for the first time.
This introduces a temporary UI regression to allow t9141 to pass
that will be reverted (fixed) in the next commit.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8
("Fix branch detection when repository root is inaccessible").
However, we now allow the option to be turned off by allowing
"--no-minimize-url" so people with limited-access setups can
still take advantage of the fix in
0b2af457a49e3b00d47d556d5301934d27909db8.
Also document the behavior and default settings of minimize-url
in the manpage for the first time.
This introduces a temporary UI regression to allow t9141 to pass
that will be reverted (fixed) in the next commit.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Documentation/git-svn.txt | patch | blob | history | |
git-svn.perl | patch | blob | history | |
t/t9141-git-svn-multiple-branches.sh | patch | blob | history |
index 068aa58a5b55dfa0fb7c33d16e2d5fa89cf645ba..22a0389f1ed12a79f0b5784c30e0b2be9716c170 100644 (file)
When passed to 'init' or 'clone' this regular expression will
be preserved as a config key. See 'fetch' for a description
of '--ignore-paths'.
+--no-minimize-url;;
+ When tracking multiple directories (using --stdlayout,
+ --branches, or --tags options), git svn will attempt to connect
+ to the root (or highest allowed level) of the Subversion
+ repository. This default allows better tracking of history if
+ entire projects are moved within a repository, but may cause
+ issues on repositories where read access restrictions are in
+ place. Passing '--no-minimize-url' will allow git svn to
+ accept URLs as-is without attempting to connect to a higher
+ level directory. This option is off by default when only
+ one URL/branch is tracked (it would do little good).
'fetch'::
Fetch unfetched revisions from the Subversion remote we are
diff --git a/git-svn.perl b/git-svn.perl
index 70159204cef7368a9c198ba668498e8712c51d92..10b77ad34c1103fc8dd390db9937496e41716fdf 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
$Git::SVN::default_repo_id = 'svn';
$Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
$Git::SVN::Ra::_log_window_size = 100;
+$Git::SVN::_minimize_url = 'unset';
$Git::SVN::Log::TZ = $ENV{TZ};
$ENV{TZ} = 'UTC';
'trunk|T=s' => \$_trunk, 'tags|t=s@' => \@_tags,
'branches|b=s@' => \@_branches, 'prefix=s' => \$_prefix,
'stdlayout|s' => \$_stdlayout,
- 'minimize-url|m' => \$Git::SVN::_minimize_url,
+ 'minimize-url|m!' => \$Git::SVN::_minimize_url,
'no-metadata' => sub { $icv{noMetadata} = 1 },
'use-svm-props' => sub { $icv{useSvmProps} = 1 },
'use-svnsync-props' => sub { $icv{useSvnsyncProps} = 1 },
init_subdir(@_);
do_git_init_db();
+ if ($Git::SVN::_minimize_url eq 'unset') {
+ $Git::SVN::_minimize_url = 0;
+ }
+
Git::SVN->init($url);
}
index 3cd06718eb552794e04afe0860d0fc1e187eed66..cb9a6d229d24a4f4af062642d07660c5701429f6 100755 (executable)
test_expect_success 'create new branches and tags' '
( cd git_project &&
- git svn branch -m "New branch 1" -d b_one New1 ) &&
+ git svn branch -m "New branch 1" -d project/b_one New1 ) &&
( cd svn_project &&
svn_cmd up && test -e b_one/New1/a.file ) &&
( cd git_project &&
- git svn branch -m "New branch 2" -d b_two New2 ) &&
+ git svn branch -m "New branch 2" -d project/b_two New2 ) &&
( cd svn_project &&
svn_cmd up && test -e b_two/New2/a.file ) &&
( cd git_project &&
- git svn branch -t -m "New tag 1" -d tags_A Tag1 ) &&
+ git svn branch -t -m "New tag 1" -d project/tags_A Tag1 ) &&
( cd svn_project &&
svn_cmd up && test -e tags_A/Tag1/a.file ) &&
( cd git_project &&
- git svn tag -m "New tag 2" -d tags_B Tag2 ) &&
+ git svn tag -m "New tag 2" -d project/tags_B Tag2 ) &&
( cd svn_project &&
svn_cmd up && test -e tags_B/Tag2/a.file )
'