Re: [PATCH/RFC] git-svn: New flag to add a file in empty directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ray Chen <rchen@xxxxxxxxxx> wrote:
> I needed this functionality when I was migrating a repository from SVN to
> Git.

This feature sounds reasonable for folks making one-shot or read-only
mirrors with git svn.

> My knowledge of SVN is limited, so I'm not sure how correct this patch is.
> I created a little test SVN repo, and `git svn clone --preserve-empty-dirs`
> did the right thing, but that's hardly a complete test.

Please provide an automated test case so it's easier to review (I almost
never see SVN repos anymore) and to ensure it stays working when other
changes are made.

> Specifically, I experimentally noticed that my patch worked with lines 4532
> and 4533 commented out.  I'm not sure what problems might occur when adding
> a file Git without associated SVN properties.

These two lines?

> +	# The following two lines don't seem to be necessary, but I'm not
> +	# familiar enough with SVN properties to know if correctness is
> +	# compromised without them.
> +#	$self->{file_prop}->{$path} = $self->{dir_prop}->{$dir};
> +#	$self->add_file($path, { 'path' => $dir }, undef, '-1');

It's been years since I dealt with the SVN library, so I'm not sure I
still remember.  I think add_file is only for files that exist in the
SVN side, not sure about the file_prop/dir_prop assignment, either.

(more in my reply to Michael's email)

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]