* git-svn: regression with funny chars in svn repo url @ 2008-04-01 18:11 Panagiotis Vossos 2008-04-07 8:11 ` Eric Wong 0 siblings, 1 reply; 5+ messages in thread From: Panagiotis Vossos @ 2008-04-01 18:11 UTC (permalink / raw) To: git I keep a copy of the gtk+ svn repository on my machine and I have noticed the following bug with git-svn: ~/gitproj/gtk+$ which git-svn /usr/local/bin/git-svn ~/gitproj/gtk+$ ls -l /usr/local/bin/git-svn lrwxrwxrwx 1 root staff 39 2008-03-30 07:45 /usr/local/bin/git-svn -> ../encap/git-1.5.4_20080328/bin/git-svn ~/gitproj/gtk+$ git-svn --version git-svn version 1.5.4.5 (svn 1.4.6) ~/gitproj/gtk+$ git-svn rebase Apache got a malformed URI: REPORT request failed on '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this repository at /usr/local/bin/git-svn line 3821 This bug did not exist in a previous version: vozzer@kermit:~/gitproj/gtk+$ ls -l /usr/local/encap/git-1.5.3_20071207/bin/git-svn -rwxr-xr-x 1 root staff 119648 2007-12-08 10:53 /usr/local/encap/git-1.5.3_20071207/bin/git-svn vozzer@kermit:~/gitproj/gtk+$ /usr/local/encap/git-1.5.3_20071207/bin/git-svn --version git-svn version 1.5.3.7.8.g8e742 (svn 1.4.6) vozzer@kermit:~/gitproj/gtk+$ /usr/local/encap/git-1.5.3_20071207/bin/git-svn rebase M gtk/gtk-builder-convert M ChangeLog r19608 = af3d481e25db0e168a33b94e14480d72af5effe4 (gtk-2-12) [snipped] , proceeds normally. I have included the output of `git-svn --version' above for both versions, but also take note of the encap directories for approximate dates: the working version was built from a fresh checkout on 2007-12-07, the non-working version was built from yesterdays checkout. For reference, the url for the gtk+ svn repo is: http://svn.gnome.org/svn/gtk+/trunk I initialized the git-svn repo with the usual '-T trunk -t tags -b branches' args. regards, panagiotis. ps. please cc me when replying, I have not subscribed to the list. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-svn: regression with funny chars in svn repo url 2008-04-01 18:11 git-svn: regression with funny chars in svn repo url Panagiotis Vossos @ 2008-04-07 8:11 ` Eric Wong 2008-04-08 21:54 ` Panagiotis Vossos 0 siblings, 1 reply; 5+ messages in thread From: Eric Wong @ 2008-04-07 8:11 UTC (permalink / raw) To: Panagiotis Vossos; +Cc: Junio C Hamano, git Panagiotis Vossos <pavossos@gmail.com> wrote: > I keep a copy of the gtk+ svn repository on my machine and I have > noticed the following bug with git-svn: > > ~/gitproj/gtk+$ which git-svn > /usr/local/bin/git-svn > > ~/gitproj/gtk+$ ls -l /usr/local/bin/git-svn > lrwxrwxrwx 1 root staff 39 2008-03-30 07:45 /usr/local/bin/git-svn -> > ../encap/git-1.5.4_20080328/bin/git-svn > > ~/gitproj/gtk+$ git-svn --version > git-svn version 1.5.4.5 (svn 1.4.6) > > ~/gitproj/gtk+$ git-svn rebase > Apache got a malformed URI: REPORT request failed on > '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this > repository at /usr/local/bin/git-svn line 3821 I've known of this bug for a while but didn't track it down until now. Please let me know if this fixes things for you and if there are any regressions; thanks. >From a9ebe54adf7ae2620fba1f638dee9566f8ccca82 Mon Sep 17 00:00:00 2001 From: Eric Wong <normalperson@yhbt.net> Date: Mon, 7 Apr 2008 00:41:44 -0700 Subject: [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path With this, git svn clone -s http://svn.gnome.org/svn/gtk+ is successful. Also modified the funky rename test for this, which _does_ include escaped '+' signs for HTTP URLs. SVN seems to accept either "+" or "%2B" in filenames and directories (just not the main URL), so I'll leave it alone for now. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- git-svn.perl | 2 +- t/t9115-git-svn-dcommit-funky-renames.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 81afb5c..d91ef7a 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3666,7 +3666,7 @@ sub escape_uri_only { my ($uri) = @_; my @tmp; foreach (split m{/}, $uri) { - s/([^\w.%-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg; + s/([^\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg; push @tmp, $_; } join('/', @tmp); diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh index 182299c..835b1dc 100755 --- a/t/t9115-git-svn-dcommit-funky-renames.sh +++ b/t/t9115-git-svn-dcommit-funky-renames.sh @@ -49,6 +49,16 @@ test_expect_success 'rename pretty file into ugly one' ' git svn dcommit ' +test_expect_success 'add a file with plus signs' ' + echo .. > +_+ && + git update-index --add +_+ && + git commit -m plus && + mkdir gtk+ && + git mv +_+ gtk+/_+_ && + git commit -m plus_dir && + git svn dcommit + ' + stop_httpd test_done -- Eric Wong ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: git-svn: regression with funny chars in svn repo url 2008-04-07 8:11 ` Eric Wong @ 2008-04-08 21:54 ` Panagiotis Vossos 2008-05-11 0:10 ` Eric Wong 0 siblings, 1 reply; 5+ messages in thread From: Panagiotis Vossos @ 2008-04-08 21:54 UTC (permalink / raw) To: Eric Wong; +Cc: Junio C Hamano, git On Mon, Apr 7, 2008 at 11:11 AM, Eric Wong <normalperson@yhbt.net> wrote: > Panagiotis Vossos <pavossos@gmail.com> wrote: > > I keep a copy of the gtk+ svn repository on my machine and I have > > noticed the following bug with git-svn: > > > > ~/gitproj/gtk+$ git-svn --version > > git-svn version 1.5.4.5 (svn 1.4.6) > > > > ~/gitproj/gtk+$ git-svn rebase > > Apache got a malformed URI: REPORT request failed on > > '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this > > repository at /usr/local/bin/git-svn line 3821 > > I've known of this bug for a while but didn't track it down until > now. Please let me know if this fixes things for you and if > there are any regressions; thanks. > > From a9ebe54adf7ae2620fba1f638dee9566f8ccca82 Mon Sep 17 00:00:00 2001 > From: Eric Wong <normalperson@yhbt.net> > Date: Mon, 7 Apr 2008 00:41:44 -0700 > Subject: [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path > > With this, git svn clone -s http://svn.gnome.org/svn/gtk+ > is successful. First of all, thanks for your reply. I applied the patch, but now 'git-svn rebase' gives me a different error. first, some context (I am on a branch based on remote trunk): ~/gitproj/gtk+$ git log | head commit e350328dee85f872db7689bf4ec7b577419333ee Author: tvb <tvb@7eb1c76a-c725-0410-a3b5-a37faf6256f8> Date: Sun Apr 6 03:10:23 2008 +0000 * gtk/gtkwidget.c: Clarified a g_warning message regarding parsing accelerators from builder files. git-svn-id: http://svn.gnome.org/svn/gtk+/trunk@19978 7eb1c76a-c725-0410-a3b5-a37faf6256f8 Trying with the latest git from the maint branch, with your patch applied: ~/gitproj/gtk+$ git-svn --version git-svn version 1.5.4.5.dirty (svn 1.4.6) ~/gitproj/gtk+$ git-svn rebase Index mismatch: d486332848849ca1e0555d4608df396946e20ad0 != ee3933caad632a093c1f7d98b813298ee806f333 rereading e350328dee85f872db7689bf4ec7b577419333ee M Makefile.decl D gtk/compose-parse.py D gtk/gtkimcontextsimpleseqs.h D gtk/gtkmountoperation.c D gtk/gtkmountoperation.h M gtk/gtkprogressbar.c M gtk/gtkfilechooserentry.h M gtk/gtktreeitem.c M gtk/gtkfilechooserdialog.c M gtk/gtkwidget.c M gtk/gtktreemodelfilter.c M gtk/gtkwidget.h M gtk/gtkfixed.c M gtk/gtkexpander.c [lots and lots of lines snipped] M gdk/gdkgc.h M gdk/gdkcairo.h M gdk/Makefile.am M gdk/x11/gdkdisplay-x11.c M gdk/x11/gdkkeys-x11.c M gdk/x11/gdkscreen-x11.c M gdk/x11/gdkprivate-x11.h M gdk/x11/gdkgeometry-x11.c M gdk/x11/gdkinput-x11.c M gdk/x11/gdktestutils-x11.c M gdk/x11/gdkwindow-x11.c M gdk/x11/gdkcolor-x11.c M gdk/x11/gdkmain-x11.c M gdk/x11/gdkgc-x11.c M Makefile.am M examples/scribble-xinput/scribble-xinput.c W: -empty_dir: trunk/modules/other/gail/tests Last fetched revision of refs/remotes/trunk was r19978, but we are about to fetch: r19234! Trying with an old git version from my encap directory: :~/gitproj/gtk+$ /usr/local/encap/git-1.5.3_20071207/bin/git-svn rebase Index mismatch: d486332848849ca1e0555d4608df396946e20ad0 != ee3933caad632a093c1f7d98b813298ee806f333 rereading e350328dee85f872db7689bf4ec7b577419333ee M gtk/gtkmenushell.c M ChangeLog r19981 = c8db7cf297fa5c309e8723b3eb0ee31be3413bf8 (trunk) M gtk/gtkfilesystem.c M ChangeLog r19982 = f180aa33ce1d3b64305d4e7a7370f58027355767 (trunk) M demos/gtk-demo/builder.c M ChangeLog r19985 = 36b09bfe222bd87c7463ac3042325c864fe5de7a (trunk) First, rewinding head to replay your work on top of it... HEAD is now at 36b09bf... 2008-04-08 Tor Lillqvist <tml@novell.com> Fast-forwarded my/trunk to refs/remotes/trunk. Before reverting your patch, I tried with the glib repository, that one has no special chars in svn url: ~/gitproj/glib$ git-svn rebase M glib/gunicode.h M ChangeLog r6843 = b38a1500f212791de7b179cf358d2593d3afcc9d (trunk) First, rewinding head to replay your work on top of it... HEAD is now at b38a150... 2008-04-08 Behdad Esfahbod <behdad@gnome.org> Fast-forwarded my/trunk to refs/remotes/trunk. ~/gitproj/glib$ That one worked perfectly. Now I reverted your patch, and tried again on gtk+ repo with vanilla upstream git from maint branch: ~/gitproj/gtk+$ git-svn rebase Apache got a malformed URI: REPORT request failed on '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this repository at /usr/local/bin/git-svn line 3821 regards, panagiotis ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-svn: regression with funny chars in svn repo url 2008-04-08 21:54 ` Panagiotis Vossos @ 2008-05-11 0:10 ` Eric Wong 2008-05-11 0:14 ` [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path Eric Wong 0 siblings, 1 reply; 5+ messages in thread From: Eric Wong @ 2008-05-11 0:10 UTC (permalink / raw) To: Panagiotis Vossos; +Cc: Junio C Hamano, git Hi again, sorry I've forgotten about this issue for a while :x Panagiotis Vossos <pavossos@gmail.com> wrote: > On Mon, Apr 7, 2008 at 11:11 AM, Eric Wong <normalperson@yhbt.net> wrote: > > > Panagiotis Vossos <pavossos@gmail.com> wrote: > > > I keep a copy of the gtk+ svn repository on my machine and I have > > > noticed the following bug with git-svn: > > > > > > ~/gitproj/gtk+$ git-svn --version > > > git-svn version 1.5.4.5 (svn 1.4.6) > > > > > > ~/gitproj/gtk+$ git-svn rebase > > > Apache got a malformed URI: REPORT request failed on > > > '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this > > > repository at /usr/local/bin/git-svn line 3821 > > > > I've known of this bug for a while but didn't track it down until > > now. Please let me know if this fixes things for you and if > > there are any regressions; thanks. > > > > From a9ebe54adf7ae2620fba1f638dee9566f8ccca82 Mon Sep 17 00:00:00 2001 > > From: Eric Wong <normalperson@yhbt.net> > > Date: Mon, 7 Apr 2008 00:41:44 -0700 > > Subject: [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path > > > > With this, git svn clone -s http://svn.gnome.org/svn/gtk+ > > is successful. > > First of all, thanks for your reply. > > I applied the patch, but now 'git-svn rebase' gives me > a different error. > > first, some context (I am on a branch based on remote trunk): > > ~/gitproj/gtk+$ git log | head > commit e350328dee85f872db7689bf4ec7b577419333ee > Author: tvb <tvb@7eb1c76a-c725-0410-a3b5-a37faf6256f8> > Date: Sun Apr 6 03:10:23 2008 +0000 > > * gtk/gtkwidget.c: Clarified a g_warning message regarding > parsing accelerators from builder files. > > git-svn-id: http://svn.gnome.org/svn/gtk+/trunk@19978 > 7eb1c76a-c725-0410-a3b5-a37faf6256f8 > > > Trying with the latest git from the maint branch, with your patch applied: > > ~/gitproj/gtk+$ git-svn --version > git-svn version 1.5.4.5.dirty (svn 1.4.6) > > ~/gitproj/gtk+$ git-svn rebase > Index mismatch: d486332848849ca1e0555d4608df396946e20ad0 != > ee3933caad632a093c1f7d98b813298ee806f333 > rereading e350328dee85f872db7689bf4ec7b577419333ee > M Makefile.decl > D gtk/compose-parse.py > D gtk/gtkimcontextsimpleseqs.h > D gtk/gtkmountoperation.c > D gtk/gtkmountoperation.h > M gtk/gtkprogressbar.c > M gtk/gtkfilechooserentry.h > M gtk/gtktreeitem.c > M gtk/gtkfilechooserdialog.c > M gtk/gtkwidget.c > M gtk/gtktreemodelfilter.c > M gtk/gtkwidget.h > M gtk/gtkfixed.c > M gtk/gtkexpander.c > [lots and lots of lines snipped] > M gdk/gdkgc.h > M gdk/gdkcairo.h > M gdk/Makefile.am > M gdk/x11/gdkdisplay-x11.c > M gdk/x11/gdkkeys-x11.c > M gdk/x11/gdkscreen-x11.c > M gdk/x11/gdkprivate-x11.h > M gdk/x11/gdkgeometry-x11.c > M gdk/x11/gdkinput-x11.c > M gdk/x11/gdktestutils-x11.c > M gdk/x11/gdkwindow-x11.c > M gdk/x11/gdkcolor-x11.c > M gdk/x11/gdkmain-x11.c > M gdk/x11/gdkgc-x11.c > M Makefile.am > M examples/scribble-xinput/scribble-xinput.c > W: -empty_dir: trunk/modules/other/gail/tests > Last fetched revision of refs/remotes/trunk was r19978, but we are > about to fetch: r19234! Really weird. This could be a rev_db => rev_map migration issues, but I haven't been able to reproduce any of it. However, for most users (those not using noMetadata or useSvmProps options, just blowing away rev_db is safe). -- Eric Wong ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path 2008-05-11 0:10 ` Eric Wong @ 2008-05-11 0:14 ` Eric Wong 0 siblings, 0 replies; 5+ messages in thread From: Eric Wong @ 2008-05-11 0:14 UTC (permalink / raw) To: Junio C Hamano; +Cc: Panagiotis Vossos, git With this, git svn clone -s http://svn.gnome.org/svn/gtk+ is successful. Also modified the funky rename test for this, which _does_ include escaped '+' signs for HTTP URLs. SVN seems to accept either "+" or "%2B" in filenames and directories (just not the main URL), so I'll leave it alone for now. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- git-svn.perl | 2 +- t/lib-git-svn.sh | 9 ++++++- t/t9115-git-svn-dcommit-funky-renames.sh | 35 +++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index e47b1ea..413e0b1 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3673,7 +3673,7 @@ sub escape_uri_only { my ($uri) = @_; my @tmp; foreach (split m{/}, $uri) { - s/([^\w.%-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg; + s/([^\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg; push @tmp, $_; } join('/', @tmp); diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 9decd2e..d8f3355 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -73,11 +73,16 @@ for d in \ done start_httpd () { + repo_base_path="$1" if test -z "$SVN_HTTPD_PORT" then echo >&2 'SVN_HTTPD_PORT is not defined!' return fi + if test -z "$repo_base_path" + then + repo_base_path=svn + fi mkdir "$GIT_DIR"/logs @@ -90,13 +95,13 @@ LockFile logs/accept.lock Listen 127.0.0.1:$SVN_HTTPD_PORT LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so -<Location /svn> +<Location /$repo_base_path> DAV svn SVNPath $rawsvnrepo </Location> EOF "$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k start - svnrepo=http://127.0.0.1:$SVN_HTTPD_PORT/svn + svnrepo="http://127.0.0.1:$SVN_HTTPD_PORT/$repo_base_path" } stop_httpd () { diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh index 182299c..4acbcb0 100755 --- a/t/t9115-git-svn-dcommit-funky-renames.sh +++ b/t/t9115-git-svn-dcommit-funky-renames.sh @@ -9,7 +9,7 @@ test_description='git-svn dcommit can commit renames of files with ugly names' test_expect_success 'load repository with strange names' " svnadmin load -q $rawsvnrepo < ../t9115/funky-names.dump && - start_httpd + start_httpd gtk+ " test_expect_success 'init and fetch repository' " @@ -49,6 +49,39 @@ test_expect_success 'rename pretty file into ugly one' ' git svn dcommit ' +test_expect_success 'add a file with plus signs' ' + echo .. > +_+ && + git update-index --add +_+ && + git commit -m plus && + mkdir gtk+ && + git mv +_+ gtk+/_+_ && + git commit -m plus_dir && + git svn dcommit + ' + +test_expect_success 'clone the repository to test rebase' " + git svn clone $svnrepo test-rebase && + cd test-rebase && + echo test-rebase > test-rebase && + git add test-rebase && + git commit -m test-rebase && + cd .. + " + +test_expect_success 'make a commit to test rebase' " + echo test-rebase-main > test-rebase-main && + git add test-rebase-main && + git commit -m test-rebase-main && + git svn dcommit + " + +test_expect_success 'git-svn rebase works inside a fresh-cloned repository' " + cd test-rebase && + git svn rebase && + test -e test-rebase-main && + test -e test-rebase + " + stop_httpd test_done -- Eric Wong ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-11 0:15 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-04-01 18:11 git-svn: regression with funny chars in svn repo url Panagiotis Vossos 2008-04-07 8:11 ` Eric Wong 2008-04-08 21:54 ` Panagiotis Vossos 2008-05-11 0:10 ` Eric Wong 2008-05-11 0:14 ` [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path 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).