{"thread":{"id":"3903","subject":"Re: [PATCH] git-svnimport symlink support","startedAt":"2006-04-17T19:29:15Z","lastAt":"2006-04-20T06:54:22Z","messageCount":5,"participants":["Junio C Hamano","smurf@smurf.noris.de","Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18782","messageId":"7v3bgcngqc.fsf@assigned-by-dhcp.cox.net","threadId":"3903","inReplyTo":"E1FVRRH-0003Wz-6w@fencepost.gnu.org","subject":"Re: [PATCH] git-svnimport symlink support","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-17T19:29:15Z","receivedAt":"2006-04-17T19:29:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Herbert Valerio Riedel <hvr@gnu.org> writes:\n\n> added svn:special symlink support for access methods other than\n> direct-http\n\nI think what the patch does makes sense.  When svn:special\nexists, check if it is of form \"link \" and munge the way a\nsymlink is represented to match what we expect.  \n\nMy understanding is that currently there is any type of special\nsvn blob defined other than \"link \", and dying rather than\npunting and silently doing a wrong thing when we see something\nelse in the future makes sense to me as well.\n\nPreviously we were feeding \"update-index --cacheinfo\" with\n'0755' and '0644', but this patch changes it to send\n100755/100644; technically this is not necessary, because\ncreate_ce_mode(m) makes it a regular file unless S_ISLNK(m), but\nI think this is good for consistency.\n\nKarl, Martin, Smurf, Comments?\n\n> Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>\n>\n>\n> ---\n>\n>  git-svnimport.perl |   18 ++++++++++++++++--\n>  1 files changed, 16 insertions(+), 2 deletions(-)\n>\n> edb2adf980e2193570a6910efc01c7ac47dcf474\n> diff --git a/git-svnimport.perl b/git-svnimport.perl\n> index 4d5371c..60ed7ae 100755\n> --- a/git-svnimport.perl\n> +++ b/git-svnimport.perl\n> @@ -98,6 +98,7 @@ package SVNconn;\n>  use File::Spec;\n>  use File::Temp qw(tempfile);\n>  use POSIX qw(strftime dup2);\n> +use Fcntl qw(SEEK_SET);\n>  \n>  sub new {\n>  \tmy($what,$repo) = @_;\n> @@ -143,9 +144,22 @@ sub file {\n>  \t}\n>  \tmy $mode;\n>  \tif (exists $properties->{'svn:executable'}) {\n> -\t\t$mode = '0755';\n> +\t\t$mode = '100755';\n> +\t} elsif (exists $properties->{'svn:special'}) {\n> +\t\tmy ($special_content, $filesize);\n> +\t\t$filesize = tell $fh;\n> +\t\tseek $fh, 0, SEEK_SET;\n> +\t\tread $fh, $special_content, $filesize;\n> +\t\tif ($special_content =~ s/^link //) {\n> +\t\t\t$mode = '120000';\n> +\t\t\tseek $fh, 0, SEEK_SET;\n> +\t\t\ttruncate $fh, 0;\n> +\t\t\tprint $fh $special_content;\n> +\t\t} else {\n> +\t\t\tdie \"unexpected svn:special file encountered\";\n> +\t\t}\n>  \t} else {\n> -\t\t$mode = '0644';\n> +\t\t$mode = '100644';\n>  \t}\n>  \tclose ($fh);\n>  \n> -- \n> 1.1.3\n"},{"id":"18799","messageId":"20060418091108.GC6650@smurf.noris.de","threadId":"3903","inReplyTo":"7v3bgcngqc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-svnimport symlink support","fromName":"","fromEmail":"smurf@smurf.noris.de","sentAt":"2006-04-18T09:11:08Z","receivedAt":"2006-04-18T09:11:08Z","isPatch":true,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi,\n\nJunio C Hamano:\n> Karl, Martin, Smurf, Comments?\nOK with me.\n-- \nMatthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de\n"},{"id":"18839","messageId":"46a038f90604181716t3d04ec95u92401858736fa6dc@mail.gmail.com","threadId":"3903","inReplyTo":"7v3bgcngqc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-svnimport symlink support","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-04-19T00:16:02Z","receivedAt":"2006-04-19T00:16:02Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 4/18/06, Junio C Hamano <junkio@cox.net> wrote:\n> Karl, Martin, Smurf, Comments?\n\n+1 but bear in mind that I am not learned in the ways of the SVN specials...\n\nmartin\n"},{"id":"18907","messageId":"20060420061546.GF15270@smurf.noris.de","threadId":"3903","inReplyTo":"46a038f90604181716t3d04ec95u92401858736fa6dc@mail.gmail.com","subject":"Re: [PATCH] git-svnimport symlink support","fromName":"","fromEmail":"smurf@smurf.noris.de","sentAt":"2006-04-20T06:15:46Z","receivedAt":"2006-04-20T06:15:46Z","isPatch":true,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi,\n\nMartin Langhoff:\n> On 4/18/06, Junio C Hamano <junkio@cox.net> wrote:\n> > Karl, Martin, Smurf, Comments?\n> \n> +1 but bear in mind that I am not learned in the ways of the SVN specials...\n> \nNeither am I, but if it seems to work -- *shrug*.\n-- \nMatthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de\n"},{"id":"18908","messageId":"7vr73s3ffl.fsf@assigned-by-dhcp.cox.net","threadId":"3903","inReplyTo":"20060420061546.GF15270@smurf.noris.de","subject":"Re: [PATCH] git-svnimport symlink support","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-20T06:54:22Z","receivedAt":"2006-04-20T06:54:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks all.\n"}]}