* [ANNOUNCE] GIT 1.6.4-rc2 @ 2009-07-23 6:40 Junio C Hamano 2009-07-23 16:32 ` Tony Finch 2009-07-24 9:38 ` Eric Wong 0 siblings, 2 replies; 12+ messages in thread From: Junio C Hamano @ 2009-07-23 6:40 UTC (permalink / raw) To: git A release candidate GIT 1.6.4-rc2 is available at the usual places for testing: http://www.kernel.org/pub/software/scm/git/ git-1.6.4.rc2.tar.{gz,bz2} (source tarball) git-htmldocs-1.6.4.rc2.tar.{gz,bz2} (preformatted docs) git-manpages-1.6.4.rc2.tar.{gz,bz2} (preformatted docs) The RPM binary packages for a few architectures are found in: testing/git-*-1.6.4.rc2-1.fc9.$arch.rpm (RPM) The changes since -rc1 are all small fixes and documentation updates; we are in a very good shape to expect 1.6.4 final by the end of the month. GIT v1.6.4 Release Notes (draft) ================================ With the next major release, "git push" into a branch that is currently checked out will be refused by default. You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository. To ease the transition plan, the receiving repository of such a push running this release will issue a big warning when the configuration variable is missing. Please refer to: http://git.or.cz/gitwiki/GitFaq#non-bare http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007 for more details on the reason why this change is needed and the transition plan. For a similar reason, "git push $there :$killed" to delete the branch $killed in a remote repository $there, if $killed branch is the current branch pointed at by its HEAD, gets a large warning. You can choose what should happen upon such a push by setting the configuration variable receive.denyDeleteCurrent in the receiving repository. Updates since v1.6.3 -------------------- (subsystems) * gitweb Perl style clean-up. * 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. (portability) * We feed iconv with "UTF-8" instead of "utf8"; the former is understood more widely. Similarly updated test scripts to use encoding names more widely understood (e.g. use "ISO8850-1" instead of "ISO-8859-1"). * Various portability fixes/workarounds for different vintages of SunOS, IRIX, and Windows. * Git-over-ssh transport on Windows supports PuTTY plink and TortoisePlink. (performance) * Many repeated use of lstat() are optimized out in "checkout" codepath. * git-status (and underlying git-diff-index --cached) are optimized to take advantage of cache-tree information in the index. (usability, bells and whistles) * "git add --edit" lets users edit the whole patch text to fine-tune what is added to the index. * "git am" accepts StGIT series file as its input. * "git bisect skip" skips to a more randomly chosen place in the hope to avoid testing a commit that is too close to a commit that is already known to be untestable. * "git cvsexportcommit" learned -k option to stop CVS keywords expansion * "git grep" learned -p option to show the location of the match using the same context hunk marker "git diff" uses. * https transport can optionally be told that the used client certificate is password protected, in which case it asks the password only once. * "git imap-send" is IPv6 aware. * "git log --graph" draws graphs more compactly by using horizonal lines when able. * "git log --decorate" shows shorter refnames by stripping well-known refs/* prefix. * "git push $name" honors remote.$name.pushurl if present before using remote.$name.url. In other words, the URL used for fetching and pushing can be different. * "git send-email" understands quoted aliases in .mailrc files (might have to be backported to 1.6.3.X). * "git send-email" can fetch the sender address from the configuration variable "sendmail.from" (and "sendmail.<identity>.from"). * "git show-branch" can color its output. * "add" and "update" subcommands to "git submodule" learned --reference option to use local clone with references. * "git submodule update" learned --rebase option to update checked out submodules by rebasing the local changes. * "gitweb" can optionally use gravatar to adorn author/committer names. (developers) * A major part of the "git bisect" wrapper has moved to C. Fixes since v1.6.3 ------------------ All of the fixes in v1.6.3.X maintenance series are included in this release, unless otherwise noted. Here are fixes that this release has, but have not been backported to v1.6.3.X series. * "git diff-tree -r -t" used to omit new or removed directories from the output. df533f3 (diff-tree -r -t: include added/removed directories in the output, 2009-06-13) may need to be cherry-picked to backport this fix. * The way Git.pm sets up a Repository object was not friendly to callers that chdir around. It now internally records the repository location as an absolute path when autodetected. --- exec >/var/tmp/1 echo O=$(git describe master) O=v1.6.4-rc1-7-gbba0fd2 git shortlog --no-merges $O..master ^maint ---------------------------------------------------------------- Changes since v1.6.4-rc1 are as follows: Brandon Casey (4): refs.c: release file descriptor on error return sha1_name.c: avoid unnecessary strbuf_release configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing Eric Wong (2): git svn: rename tests that had conflicting numbers git svn: fix reparenting when ugly http(s) URLs are used Junio C Hamano (5): checkout -f: deal with a D/F conflict entry correctly push: do not give big warning when no preference is configured Updates to draft release notes to 1.6.4 combine-diff.c: fix performance problem when folding common deleted lines diff --cc: a lost line at the beginning of the file is shown incorrectly Martin Koegler (1): git stash: modernize use of "dashed" git-XXX calls Michael J Gruber (1): t4202-log.sh: Test git log --no-walk sort order Mike Ralphson (1): cvsexportcommit: reorder tests to quiet intermittent failure Pierre Habouzit (4): janitor: use NULL and not 0 for pointers. refactor: use bitsizeof() instead of 8 * sizeof() janitor: add DIV_ROUND_UP and use it. janitor: useless checks before free SZEDER Gábor (1): Trailing whitespace and no newline fix Yann Dirson (2): List send-email config options in config.txt. Improve doc for format-patch threading options. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-23 6:40 [ANNOUNCE] GIT 1.6.4-rc2 Junio C Hamano @ 2009-07-23 16:32 ` Tony Finch 2009-07-24 9:38 ` Eric Wong 1 sibling, 0 replies; 12+ messages in thread From: Tony Finch @ 2009-07-23 16:32 UTC (permalink / raw) To: Junio C Hamano; +Cc: git On Wed, 22 Jul 2009, Junio C Hamano wrote: > > (portability) > > * We feed iconv with "UTF-8" instead of "utf8"; the former is > understood more widely. Similarly updated test scripts to use > encoding names more widely understood (e.g. use "ISO8850-1" instead > of "ISO-8859-1"). Typo: ISO8859-1 not ISO8850-1 (9 not 0) Tony. -- f.anthony.n.finch <dot@dotat.at> http://dotat.at/ GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS. MODERATE OR GOOD. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-23 6:40 [ANNOUNCE] GIT 1.6.4-rc2 Junio C Hamano 2009-07-23 16:32 ` Tony Finch @ 2009-07-24 9:38 ` Eric Wong 2009-07-24 17:49 ` Junio C Hamano 1 sibling, 1 reply; 12+ messages in thread From: Eric Wong @ 2009-07-24 9:38 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Mattias Nissler 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. The good thing is that access-limited repositories are easier to setup and import. So if you only had access for a sub_project under the repository root in svn://example.com/big_project/sub_project, you won't need read permissions to / or /big_project, just /big_project/sub_project and everything under it. Unfortunately, this default breaks the case where a project is moved to a lower-level within the repository: svn://example.com/foo => svn://example.com/big_project/sub_project Without --minimize-url enabled, your clone would register "/big_project/sub_project" to track and not be able to find the history of "/foo". With --minimize-url (the old behavior), you would've registered "/" to be able to track all subdirectories underneath the repository root (assuming the SVN repo is world-readable). While both cases are fairly rare, I've personally encountered the latter (and now broken-by-default) case more. This is because I mainly use git/git svn to work on free software without read restrictions. However, with more and more free projects switching entirely to git, maybe leaving the default to be more friendly to people on restrictive setups will be more helpful than harmful. This change only affects the creation of new clones, existing repos are unaffected. Let me know if the above made sense, it's late and I nodded off several times while writing this. -- Eric Wong ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-24 9:38 ` Eric Wong @ 2009-07-24 17:49 ` Junio C Hamano 2009-07-25 10:38 ` Eric Wong 0 siblings, 1 reply; 12+ messages in thread From: Junio C Hamano @ 2009-07-24 17:49 UTC (permalink / raw) To: Eric Wong; +Cc: git, Mattias Nissler 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. > > > The good thing is that access-limited repositories are easier to setup > and import. So if you only had access for a sub_project under the > repository root in svn://example.com/big_project/sub_project, > you won't need read permissions to / or /big_project, just > /big_project/sub_project and everything under it. > > > Unfortunately, this default breaks the case where a project is moved to > a lower-level within the repository: > > svn://example.com/foo => svn://example.com/big_project/sub_project > > Without --minimize-url enabled, your clone would register > "/big_project/sub_project" to track and not be able to find the history > of "/foo". With --minimize-url (the old behavior), you would've > registered "/" to be able to track all subdirectories underneath the > repository root (assuming the SVN repo is world-readable). > > > While both cases are fairly rare, I've personally encountered the latter > (and now broken-by-default) case more. This is because I mainly use > git/git svn to work on free software without read restrictions. > However, with more and more free projects switching entirely to git, > maybe leaving the default to be more friendly to people on restrictive > setups will be more helpful than harmful. > > This change only affects the creation of new clones, existing repos > are unaffected. > > 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. Minimally, a patch to git-svn.txt and RelNotes-1.6.4.txt in Documentation/ to describe the situation with a recipe (in the former) to allow people the older behaviour would be in order. It appears minimize-url is not even documented as far as I can see in the current documentation set. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-24 17:49 ` Junio C Hamano @ 2009-07-25 10:38 ` Eric Wong 2009-07-25 11:10 ` [PATCH 2/2] git svn: the branch command no longer needs the full path Eric Wong 2009-07-25 13:39 ` [ANNOUNCE] GIT 1.6.4-rc2 Mattias Nissler 0 siblings, 2 replies; 12+ messages in thread From: Eric Wong @ 2009-07-25 10:38 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Mattias Nissler 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. > Minimally, a patch to git-svn.txt and RelNotes-1.6.4.txt in Documentation/ > to describe the situation with a recipe (in the former) to allow people > the older behaviour would be in order. It appears minimize-url is not > even documented as far as I can see in the current documentation set. >From a93241b082cd6e7344d0e53969b1e66d443fa48b Mon Sep 17 00:00:00 2001 From: Eric Wong <normalperson@yhbt.net> Date: Sat, 25 Jul 2009 00:00:50 -0700 Subject: [PATCH] git-svn: revert default behavior for --minimize-url 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> --- Documentation/git-svn.txt | 11 +++++++++++ git-svn.perl | 7 ++++++- t/t9141-git-svn-multiple-branches.sh | 8 ++++---- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 068aa58..22a0389 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -80,6 +80,17 @@ COMMANDS 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 7015920..10b77ad 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -19,6 +19,7 @@ $ENV{GIT_DIR} ||= '.git'; $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'; @@ -100,7 +101,7 @@ my %init_opts = ( 'template=s' => \$_template, 'shared:s' => \$_shared, '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 }, @@ -399,6 +400,10 @@ sub cmd_init { init_subdir(@_); do_git_init_db(); + if ($Git::SVN::_minimize_url eq 'unset') { + $Git::SVN::_minimize_url = 0; + } + Git::SVN->init($url); } diff --git a/t/t9141-git-svn-multiple-branches.sh b/t/t9141-git-svn-multiple-branches.sh index 3cd0671..cb9a6d2 100755 --- a/t/t9141-git-svn-multiple-branches.sh +++ b/t/t9141-git-svn-multiple-branches.sh @@ -99,22 +99,22 @@ test_expect_success 'Multiple branch or tag paths require -d' ' 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 ) ' -- Eric Wong ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] git svn: the branch command no longer needs the full path 2009-07-25 10:38 ` Eric Wong @ 2009-07-25 11:10 ` Eric Wong 2009-07-26 8:13 ` Junio C Hamano 2009-07-25 13:39 ` [ANNOUNCE] GIT 1.6.4-rc2 Mattias Nissler 1 sibling, 1 reply; 12+ messages in thread From: Eric Wong @ 2009-07-25 11:10 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Mattias Nissler This was introduced in 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible") but reintroduced in the previous commit. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- Also pushed out to git://git.bogomips.org/git-svn along with some other changes: # I removed the "-" in "git svn" in the pushed out version of # "git svn: revert default behavior for --minimize-url" Eric Wong (4): git svn: revert default behavior for --minimize-url git svn: the branch command no longer needs the full path t9142: remember to stop httpd if it was used git svn: avoid escaping '/' when renaming/copying files # I thought I had pushed this out earlier: Robert Allan Zeh (1): git svn: add gc command git-svn.perl | 19 ++++++++++++++++--- t/t9141-git-svn-multiple-branches.sh | 8 ++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 10b77ad..9808597 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -666,9 +666,22 @@ sub cmd_branch { } } unless (defined $glob) { - die "Unknown ", - $_tag ? "tag" : "branch", - " destination $_branch_dest\n"; + my $dest_re = qr/\b\Q$_branch_dest\E\b/; + foreach my $g (@{$allglobs}) { + $g->{path}->{left} =~ /$dest_re/ or next; + if (defined $glob) { + die "Ambiguous destination: ", + $_branch_dest, "\nmatches both '", + $glob->{path}->{left}, "' and '", + $g->{path}->{left}, "'\n"; + } + $glob = $g; + } + unless (defined $glob) { + die "Unknown ", + $_tag ? "tag" : "branch", + " destination $_branch_dest\n"; + } } } my ($lft, $rgt) = @{ $glob->{path} }{qw/left right/}; diff --git a/t/t9141-git-svn-multiple-branches.sh b/t/t9141-git-svn-multiple-branches.sh index cb9a6d2..3cd0671 100755 --- a/t/t9141-git-svn-multiple-branches.sh +++ b/t/t9141-git-svn-multiple-branches.sh @@ -99,22 +99,22 @@ test_expect_success 'Multiple branch or tag paths require -d' ' test_expect_success 'create new branches and tags' ' ( cd git_project && - git svn branch -m "New branch 1" -d project/b_one New1 ) && + git svn branch -m "New branch 1" -d 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 project/b_two New2 ) && + git svn branch -m "New branch 2" -d 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 project/tags_A Tag1 ) && + git svn branch -t -m "New tag 1" -d 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 project/tags_B Tag2 ) && + git svn tag -m "New tag 2" -d tags_B Tag2 ) && ( cd svn_project && svn_cmd up && test -e tags_B/Tag2/a.file ) ' -- Eric Wong ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] git svn: the branch command no longer needs the full path 2009-07-25 11:10 ` [PATCH 2/2] git svn: the branch command no longer needs the full path Eric Wong @ 2009-07-26 8:13 ` Junio C Hamano 2009-07-26 10:01 ` [PATCH] t9143: do not fail if Compress::Zlib is missing Eric Wong 0 siblings, 1 reply; 12+ messages in thread From: Junio C Hamano @ 2009-07-26 8:13 UTC (permalink / raw) To: Eric Wong; +Cc: git, Robert Allan Zeh Eric Wong <normalperson@yhbt.net> writes: > # I thought I had pushed this out earlier: > Robert Allan Zeh (1): > git svn: add gc command Note that with this commit, the test fails needlessly if Compress::Zlib is not found, even though otherwise "svn gc" succeeds (for some definition of "success").. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] t9143: do not fail if Compress::Zlib is missing 2009-07-26 8:13 ` Junio C Hamano @ 2009-07-26 10:01 ` Eric Wong 0 siblings, 0 replies; 12+ messages in thread From: Eric Wong @ 2009-07-26 10:01 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Robert Allan Zeh "git svn gc" will not compress unhandled.log files if Compress::Zlib is missing. However, leftover index files should always be removed, so add a test for this behavior as well. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- Junio C Hamano <gitster@pobox.com> wrote: > Eric Wong <normalperson@yhbt.net> writes: > > > # I thought I had pushed this out earlier: > > Robert Allan Zeh (1): > > git svn: add gc command > > Note that with this commit, the test fails needlessly if Compress::Zlib is > not found, even though otherwise "svn gc" succeeds (for some definition of > "success").. Oops, this test completely slipped my mind even though I caught the issue in the original code. Pushed out to git://git.bogomips.org/git-svn t/t9143-git-svn-gc.sh | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh index aaa3af0..f2ba2d1 100755 --- a/t/t9143-git-svn-gc.sh +++ b/t/t9143-git-svn-gc.sh @@ -31,11 +31,20 @@ test_expect_success 'make backup copy of unhandled.log' ' cp .git/svn/git-svn/unhandled.log tmp ' +test_expect_success 'create leftover index' '> .git/svn/git-svn/index' + test_expect_success 'git svn gc runs' 'git svn gc' -test_expect_success 'git svn gc produces a valid gzip file' ' - gunzip .git/svn/git-svn/unhandled.log.gz - ' +test_expect_success 'git svn index removed' '! test -f .git/svn/git-svn/index' + +if perl -MCompress::Zlib -e 0 2>/dev/null +then + test_expect_success 'git svn gc produces a valid gzip file' ' + gunzip .git/svn/git-svn/unhandled.log.gz + ' +else + say "Perl Compress::Zlib unavailable, skipping gunzip test" +fi test_expect_success 'git svn gc does not change unhandled.log files' ' test_cmp .git/svn/git-svn/unhandled.log tmp/unhandled.log -- Eric Wong ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-25 10:38 ` Eric Wong 2009-07-25 11:10 ` [PATCH 2/2] git svn: the branch command no longer needs the full path Eric Wong @ 2009-07-25 13:39 ` Mattias Nissler 2009-07-25 19:22 ` Eric Wong 1 sibling, 1 reply; 12+ messages in thread From: Mattias Nissler @ 2009-07-25 13:39 UTC (permalink / raw) To: Eric Wong; +Cc: Junio C Hamano, git 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. Mattias ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-25 13:39 ` [ANNOUNCE] GIT 1.6.4-rc2 Mattias Nissler @ 2009-07-25 19:22 ` Eric Wong 2009-07-25 20:16 ` Mattias Nissler 0 siblings, 1 reply; 12+ messages in thread From: Eric Wong @ 2009-07-25 19:22 UTC (permalink / raw) To: Mattias Nissler; +Cc: Junio C Hamano, git Mattias Nissler <mattias.nissler@gmx.de> wrote: > 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] GIT 1.6.4-rc2 2009-07-25 19:22 ` Eric Wong @ 2009-07-25 20:16 ` Mattias Nissler 2009-07-25 20:57 ` [PATCH] git svn: make minimize URL more reliable over http(s) Eric Wong 0 siblings, 1 reply; 12+ messages in thread From: Mattias Nissler @ 2009-07-25 20:16 UTC (permalink / raw) To: Eric Wong; +Cc: Junio C Hamano, git On Sat, 2009-07-25 at 12:22 -0700, Eric Wong wrote: > Mattias Nissler <mattias.nissler@gmx.de> wrote: > > 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? Well, I simply wasn't aware of this. I've just retried and it turns out latest git.git works perfectly for me in both restricted and non-restricted setups. Great work! Mattias ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] git svn: make minimize URL more reliable over http(s) 2009-07-25 20:16 ` Mattias Nissler @ 2009-07-25 20:57 ` Eric Wong 0 siblings, 0 replies; 12+ messages in thread From: Eric Wong @ 2009-07-25 20:57 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Mattias Nissler In addition to path-based restrictions, Subversion servers over http(s) may have access controls implemented via the LimitExcept directive in Apache. In some cases, LimitExcept may be (arguably) misconfigured to not allow REPORT requests while allowing OPTIONS and PROPFIND. This caused problems with our existing minimize_url logic that only issued OPTIONS and PROPFIND requests when connecting and using SVN::Ra::get_latest_revnum. We now call SVN::Ra::get_log if get_latest_revnum succeeds, resulting in a REPORT request being sent. This will increase our chances of tripping access controls before we start attempting to fetch history. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- Also pushed out to git://git.bogomips.org/git-svn Mattias Nissler <mattias.nissler@gmx.de> wrote: > On Sat, 2009-07-25 at 12:22 -0700, Eric Wong wrote: > > Mattias Nissler <mattias.nissler@gmx.de> wrote: > > > 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: <snip> > > Maybe get_latest_revnum() isn't strong enough of a check for > > certain setups and get_log() needs to be used instead? > > Well, I simply wasn't aware of this. I've just retried and it turns out > latest git.git works perfectly for me in both restricted and > non-restricted setups. Great work! git-svn.perl | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index fd7232c..d075810 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -4831,7 +4831,11 @@ sub minimize_url { my $c = ''; do { $url .= "/$c" if length $c; - eval { (ref $self)->new($url)->get_latest_revnum }; + eval { + my $ra = (ref $self)->new($url); + my $latest = $ra->get_latest_revnum; + $ra->get_log("", $latest, 0, 1, 0, 1, sub {}); + }; } while ($@ && ($c = shift @components)); $url; } -- Eric Wong ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-07-26 10:06 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-23 6:40 [ANNOUNCE] GIT 1.6.4-rc2 Junio C Hamano 2009-07-23 16:32 ` Tony Finch 2009-07-24 9:38 ` Eric Wong 2009-07-24 17:49 ` Junio C Hamano 2009-07-25 10:38 ` Eric Wong 2009-07-25 11:10 ` [PATCH 2/2] git svn: the branch command no longer needs the full path Eric Wong 2009-07-26 8:13 ` Junio C Hamano 2009-07-26 10:01 ` [PATCH] t9143: do not fail if Compress::Zlib is missing Eric Wong 2009-07-25 13:39 ` [ANNOUNCE] GIT 1.6.4-rc2 Mattias Nissler 2009-07-25 19:22 ` Eric Wong 2009-07-25 20:16 ` Mattias Nissler 2009-07-25 20:57 ` [PATCH] git svn: make minimize URL more reliable over http(s) Eric Wong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).