From: Daniel Drake <hidden> Date: 2016-08-11 20:45:09
Hi,
git-svnimport broken between git-1.4.3.5 and git-1.4.4
I have found that commit 83936a29e275bc0c04f60d3333e4951a9e16b1fc is the
cause of this.
I am using git-svnimport to work with a repo with this layout:
https://server/repo/trunkhttps://server/repo/tags/x.y.zhttps://server/repo/branches/somebranch
Starting a fresh import:
# git-svnimport -v -i -C repo -r https://server repo
Fetching from 1 to 10707 ...
Tree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Committed change 1:/ 2004-12-22 22:53:27)
Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Commit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c
Writing to refs/heads/origin
DONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c
RA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':
PROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://server)
at /usr/bin/git-svnimport line 358
According to the server logs, git is requesting /trunk/.cvsignore rather
than /repo/trunk/.cvsignore
I'm happy to test patches and whatnot but don't have time to investigate
further right now.
Thanks!
--
Daniel Drake
Brontes Technologies, A 3M Company
Is this 'server' public? Can I rerun this git-svnimport?
Sorry, it is not.
quoted hunk
@@ -906,7 +912,7 @@ sub commit_all { my ($changed_paths, $revision, $author, $date, $message, $pool) = @_; my %p; while(my($path,$action) = each %$changed_paths) {- $p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];+ $p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];
This is not valid perl - I think you wanted $svn_dir . $path
After making that modification it's not fixed though:
Fetching from 1 to 10742 ...
Tree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Committed change 1:/ 2004-12-22 22:53:27)
Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Commit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c
Writing to refs/heads/origin
DONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c
perl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion
`is_canonical (path, len)' failed.
Aborted
--
Daniel Drake
Brontes Technologies, A 3M Company
From: Daniel Drake <hidden> Date: 2016-08-11 19:28:22
On Mon, 2006-12-11 at 22:49 +0200, Sasha Khapyorsky wrote:
Maybe I'm starting to understand. Your svn url (url which points to svn
repository) is https://server/repo and not just https://server, right?
If so, please remove the patch (you don't need it) and rerun:
git-svnimport -v -i -C repo -r https://server/repo
Sorry, apparently I was using the wrong git-svnimport in my last mail.
The above command, with or without your svn_dir patch, doesn't solve the
problem.
With your patch:
# git-svnimport -v -i -C repo -r https://server/repo
RA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':
PROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://svn) at
git-svnimport line 364
# git-svnimport -v -i -C repo -r https://server repo
perl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion
`is_canonical (path, len)' failed.
Aborted
Without the patch, the error is the same as the 1st case in both
situations.
--
Daniel Drake
Brontes Technologies, A 3M Company
From: Dongsheng Song <hidden> Date: 2016-08-11 19:31:42
Sorry, I assume you have see http://tortoisesvn.tigris.org/:
username : guest
password : ""
2006/12/10, Sasha Khapyorsky [off-list ref]:
On 11:49 Sun 10 Dec , Dongsheng Song wrote:
quoted
I met the broken too, when I downgrade to 1.4.3.4, it's fine.
I have not test your patch, but you can try your self,
http://tortoisesvn.tigris.org/svn/tortoisesvn
and the master branch(today) fail between r6000~r7000 too
Thanks for the link. but I cannot access - this requires
username/password authentication.
Sasha
I met the broken too, when I downgrade to 1.4.3.4, it's fine.
I have not test your patch, but you can try your self,
http://tortoisesvn.tigris.org/svn/tortoisesvn
and the master branch(today) fail between r6000~r7000 too
Thanks for the link. but I cannot access - this requires
username/password authentication.
From: Dongsheng Song <hidden> Date: 2016-08-11 19:51:34
I met the broken too, when I downgrade to 1.4.3.4, it's fine.
I have not test your patch, but you can try your self,
http://tortoisesvn.tigris.org/svn/tortoisesvn
and the master branch(today) fail between r6000~r7000 too
2006/12/9, Sasha Khapyorsky [off-list ref]:
Hi,
On 10:26 Thu 07 Dec , Daniel Drake wrote:
quoted
git-svnimport broken between git-1.4.3.5 and git-1.4.4
Is this 'server' public? Can I rerun this git-svnimport?
If not, please try the patch:
Is this 'server' public? Can I rerun this git-svnimport?
Sorry, it is not.
quoted
@@ -906,7 +912,7 @@ sub commit_all { my ($changed_paths, $revision, $author, $date, $message, $pool) = @_; my %p; while(my($path,$action) = each %$changed_paths) {- $p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];+ $p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];
This is not valid perl - I think you wanted $svn_dir . $path
Yes, sorry.
After making that modification it's not fixed though:
Fetching from 1 to 10742 ...
Tree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Committed change 1:/ 2004-12-22 22:53:27)
Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Commit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c
Writing to refs/heads/origin
DONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c
perl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion
`is_canonical (path, len)' failed.
Aborted
Maybe I'm starting to understand. Your svn url (url which points to svn
repository) is https://server/repo and not just https://server, right?
If so, please remove the patch (you don't need it) and rerun:
git-svnimport -v -i -C repo -r https://server/repo
Sorry, apparently I was using the wrong git-svnimport in my last mail.
The above command, with or without your svn_dir patch, doesn't solve the
problem.
With your patch:
Original patch is wrong, so only w/out this patch.
# git-svnimport -v -i -C repo -r https://server/repo
RA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':
PROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://svn) at
git-svnimport line 364
Without the patch, the error is the same as the 1st case in both
situations.
@@ -210,6 +210,12 @@ $svn .= "/$svn_dir" if defined $svn_dir;my$svn2=SVNconn->new($svn);$svn=SVNconn->new($svn);+if($svn_dir){+$svn_dir=~s#/*$#/#;+}else{+$svn_dir="";+}+my$lwp_ua;if($opt_dor$opt_D){$svn_url=URI->new($svn_url)->canonical;
@@ -906,7 +912,7 @@ sub commit_all {my($changed_paths,$revision,$author,$date,$message,$pool)=@_;my%p;while(my($path,$action)=each%$changed_paths){-$p{$path}=[$action->action,$action->copyfrom_path,$action->copyfrom_rev,$path];+$p{$path}=[$action->action,$svn_dir$action->copyfrom_path,$action->copyfrom_rev,$svn_dir$path];}$changed_paths=\%p;