* Re: [PATCH] git-svnimport symlink support
[not found] <E1FVRRH-0003Wz-6w@fencepost.gnu.org>
@ 2006-04-17 19:29 ` Junio C Hamano
2006-04-18 9:11 ` smurf
2006-04-19 0:16 ` Martin Langhoff
0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-04-17 19:29 UTC (permalink / raw)
To: Karl Hasselström, Martin Langhoff, Matthias Urlichs
Cc: Herbert Valerio Riedel, git
Herbert Valerio Riedel <hvr@gnu.org> writes:
> added svn:special symlink support for access methods other than
> direct-http
I think what the patch does makes sense. When svn:special
exists, check if it is of form "link " and munge the way a
symlink is represented to match what we expect.
My understanding is that currently there is any type of special
svn blob defined other than "link ", and dying rather than
punting and silently doing a wrong thing when we see something
else in the future makes sense to me as well.
Previously we were feeding "update-index --cacheinfo" with
'0755' and '0644', but this patch changes it to send
100755/100644; technically this is not necessary, because
create_ce_mode(m) makes it a regular file unless S_ISLNK(m), but
I think this is good for consistency.
Karl, Martin, Smurf, Comments?
> Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
>
>
> ---
>
> git-svnimport.perl | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
> edb2adf980e2193570a6910efc01c7ac47dcf474
> diff --git a/git-svnimport.perl b/git-svnimport.perl
> index 4d5371c..60ed7ae 100755
> --- a/git-svnimport.perl
> +++ b/git-svnimport.perl
> @@ -98,6 +98,7 @@ package SVNconn;
> use File::Spec;
> use File::Temp qw(tempfile);
> use POSIX qw(strftime dup2);
> +use Fcntl qw(SEEK_SET);
>
> sub new {
> my($what,$repo) = @_;
> @@ -143,9 +144,22 @@ sub file {
> }
> my $mode;
> if (exists $properties->{'svn:executable'}) {
> - $mode = '0755';
> + $mode = '100755';
> + } elsif (exists $properties->{'svn:special'}) {
> + my ($special_content, $filesize);
> + $filesize = tell $fh;
> + seek $fh, 0, SEEK_SET;
> + read $fh, $special_content, $filesize;
> + if ($special_content =~ s/^link //) {
> + $mode = '120000';
> + seek $fh, 0, SEEK_SET;
> + truncate $fh, 0;
> + print $fh $special_content;
> + } else {
> + die "unexpected svn:special file encountered";
> + }
> } else {
> - $mode = '0644';
> + $mode = '100644';
> }
> close ($fh);
>
> --
> 1.1.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-svnimport symlink support
2006-04-17 19:29 ` [PATCH] git-svnimport symlink support Junio C Hamano
@ 2006-04-18 9:11 ` smurf
2006-04-19 0:16 ` Martin Langhoff
1 sibling, 0 replies; 5+ messages in thread
From: smurf @ 2006-04-18 9:11 UTC (permalink / raw)
To: Junio C Hamano
Cc: Karl Hasselström, Martin Langhoff, Herbert Valerio Riedel,
git
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
Hi,
Junio C Hamano:
> Karl, Martin, Smurf, Comments?
OK with me.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-svnimport symlink support
2006-04-17 19:29 ` [PATCH] git-svnimport symlink support Junio C Hamano
2006-04-18 9:11 ` smurf
@ 2006-04-19 0:16 ` Martin Langhoff
2006-04-20 6:15 ` smurf
1 sibling, 1 reply; 5+ messages in thread
From: Martin Langhoff @ 2006-04-19 0:16 UTC (permalink / raw)
To: Junio C Hamano
Cc: Karl Hasselström, Martin Langhoff, Matthias Urlichs,
Herbert Valerio Riedel, git
On 4/18/06, Junio C Hamano <junkio@cox.net> wrote:
> Karl, Martin, Smurf, Comments?
+1 but bear in mind that I am not learned in the ways of the SVN specials...
martin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-svnimport symlink support
2006-04-19 0:16 ` Martin Langhoff
@ 2006-04-20 6:15 ` smurf
2006-04-20 6:54 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: smurf @ 2006-04-20 6:15 UTC (permalink / raw)
To: Martin Langhoff
Cc: Junio C Hamano, Karl Hasselström, Martin Langhoff,
Herbert Valerio Riedel, git
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
Hi,
Martin Langhoff:
> On 4/18/06, Junio C Hamano <junkio@cox.net> wrote:
> > Karl, Martin, Smurf, Comments?
>
> +1 but bear in mind that I am not learned in the ways of the SVN specials...
>
Neither am I, but if it seems to work -- *shrug*.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-svnimport symlink support
2006-04-20 6:15 ` smurf
@ 2006-04-20 6:54 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-04-20 6:54 UTC (permalink / raw)
To: smurf; +Cc: git, Martin Langhoff, Herbert Valerio Riedel
Thanks all.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-04-20 6:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1FVRRH-0003Wz-6w@fencepost.gnu.org>
2006-04-17 19:29 ` [PATCH] git-svnimport symlink support Junio C Hamano
2006-04-18 9:11 ` smurf
2006-04-19 0:16 ` Martin Langhoff
2006-04-20 6:15 ` smurf
2006-04-20 6:54 ` Junio C Hamano
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).