You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2005/06/08 16:53:17 UTC

Re: [PATCH] Issue #869 - import should use .svn area to get props

S.Ramaswamy wrote:
> Log:
> 
> Fix issue #869. Include properties when importing from a working copy.

I don't feel that this is as straightforward as it sounds.  What are the 
required semantics?  Here is my best guess off the top of my head, but I 
haven't studied the implications:


+ If a directory being imported is already a WC, then:

   + Import the directory with its existing properties (including svn:externals).

   + For each child that is versioned, import it with its existing Subversion 
properties, without invoking any of the heuristic rules that would otherwise 
have been used to set properties such as svn:mime-type and svn:executable.

   + Use the directory's svn:ignore property (as well as the global ignores) to 
determine which unversioned files to ignore.

   + For each unversioned child to be imported, use the normal "import" rules.


Is that the behaviour we want?  Is that what the patch does?

- Julian

> 
> * subversion/libsvn_client/commit.c
>     (import_dir) : Add properties of versioned directories.
> 
>     (import_file) : Add properties of versioned files.
> 
> * subversion/tests/clients/cmdline/import_tests.py
>     (test_list) : Added new test "import_wc" to list of import tests.
> 
>     (import_wc) : New test. Verify that properties are also imported.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Issue #869 - import should use .svn area to get props

Posted by Julian Foad <ju...@btopenworld.com>.
Ramaswamy S wrote:
> I attempted  to fix this patch after noticing some users here
> regularly using 'svn import' from a wc instead of doing a 'svn copy'
> to create a branch.

Wouldn't it be better to teach the users to use "svn copy"?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Issue #869 - import should use .svn area to get props

Posted by Ramaswamy S <sr...@gmail.com>.
> Well, please note that I am asking the developers - including you - to decide
> on what behaviour is wanted.  Making that decision involves thinking about
> typical use cases and comparing the pros and cons of each behaviour option.  If
> you modify the patch before that decision is made you might have to un-modify it!
> 
ok, I will wait - in any case I may not be able to attend to this for a while.

I attempted  to fix this patch after noticing some users here
regularly using 'svn import' from a wc instead of doing a 'svn copy'
to create a branch.

Thanks
Ramaswamy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [PATCH] Issue #869 - import should use .svn area to get props

Posted by Julian Foad <ju...@btopenworld.com>.
S.Ramaswamy wrote:
>>  + For each unversioned child to be imported, use the normal "import"
>>  rules.
> 
> Normal import rules ? Is there a contradiction between the last
> requirement and the previous one about using a directory's
> svn:ignore to ignore unversioned files.

By "normal import rules" I meant the method that has been used until now to 
import unversioned items - including a heuristic to decide if it is binary, and 
a rule to set the "svn:executable" property if its operating system 
"executable" bit is set.

> I will modify the patch to (a) skip importing svn:mime-type and
> possibly svn:executable ( don't remember otoh if import heurestically
> sets the latter as well) (b) honor the svn:ignore's on dirs

Well, please note that I am asking the developers - including you - to decide 
on what behaviour is wanted.  Making that decision involves thinking about 
typical use cases and comparing the pros and cons of each behaviour option.  If 
you modify the patch before that decision is made you might have to un-modify it!

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Issue #869 - import should use .svn area to get props

Posted by "S.Ramaswamy" <ra...@collab.net>.
>
>
> + If a directory being imported is already a WC, then:
>
>   + Import the directory with its existing properties (including
>   svn:externals).
>

Properties on directories including svn:externals are also added.

>   + For each child that is versioned, import it with its existing
>   Subversion
> properties, without invoking any of the heuristic rules that would
> otherwise  have been used to set properties such as svn:mime-type and
> svn:executable.
>

Need to check this - the patch uses svn_client_proplist2() to find
props - svn:mime-type could be skipped since 'svn import' in any
case heuristically sets this property.

>   + Use the directory's svn:ignore property (as well as the global
>   ignores) to
> determine which unversioned files to ignore.

No, the patch does not use a directory's svn:ignore to determine
which unversioned files to ignore.

>
>   + For each unversioned child to be imported, use the normal "import"
>   rules.
>

Normal import rules ? Is there a contradiction between the last
requirement and the previous one about using a directory's
svn:ignore to ignore unversioned files.

I will modify the patch to (a) skip importing svn:mime-type and
possibly svn:executable ( don't remember otoh if import heurestically
sets the latter as well) (b) honor the svn:ignore's on dirs

Thanks for the review.
Ramaswamy




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org