You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Markus Schaber <m....@3s-software.com> on 2011/08/22 12:00:50 UTC

Single-commit import with properties and SVN 1.7

Hi,

We need to add a new directory including files and properties to a
subversion repository "in-place".

With SVN 1.6, the following did work: (I know that this is only an
artifact and was no documented / intended behavior.)
- Checkout the parent directory to a temporary place.
- create and svn add the data directory under the parent working copy.
- svn add and svn propset all the children we need in the working copy.
- svn commit the parent directory (to add everything in a single
commit.)
- move the data directory to the intended working copy place.
- delete the temporary parent directory.

With SVN 1.7, I only see a way to do this with 2 commits:
- svn remote add the data directory. (First commit)
- checkout the data directory
- fill the data directory with contents (files and properties)
- svn commit the data directory. (Second commit).
(This is analogeous to the "in-place import" in the FAQ.)

Is it theoretically possible with the new working copy architecture to
allow the working copy root itself to be "scheduled for addition"?

This could be the base for a nice feature for SVN 1.8, allowing both
"in-place import" and "import with properties", maybe some command like
"svn checkout --for-addition
svn://destination/url/to/some/non/existing/directory/with/existing/paren
t".



Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 



Re: Single-commit import with properties and SVN 1.7

Posted by Andreas Krey <a....@gmx.de>.
On Tue, 23 Aug 2011 09:30:43 +0000, Ulrich Eckhardt wrote:
...
> 1. You could try to "svn switch" the workspace where you added the file tree 
> to its own child. In theory, the metadata should be locally present already, 
> so no network traffic is required. If SVN is smart enough to re-use the 
> existing files, this could be a very cheap operation.

I would bet that svn 1.6 doesn't do this optimization, and I doubt that
1.7 will avoid refetching the data by finding out beforehand that copies
of them are already in the pristine store. The latter would be somewhat
clever, however. Would speed up 'normal' switches as well, at the expense
of more space being used for the pristine store (the latter being the
case for 1.7 anyway -- no pristine GC).

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

Re: Single-commit import with properties and SVN 1.7

Posted by Ulrich Eckhardt <ul...@dominolaser.com>.
On Tuesday 23 August 2011, Markus Schaber wrote:
> This is exactly what I described as our current workaround for SVN 1.7,
> or did I miss something?

No, you didn't.

Sorry for the noise...

Uli

-- 
ML: http://tortoisesvn.tigris.org/list_etiquette.html
FAQ: http://tortoisesvn.net/faq

**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************


AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi,

Von: Markus Schaber [mailto:m.schaber@3s-software.com]
> Von: Ulrich Eckhardt [mailto:ulrich.eckhardt@dominolaser.com]
> > On Monday 22 August 2011, Markus Schaber wrote:
> > > We need to add a new directory including files and properties to a
> > > subversion repository "in-place".
> >
> > There are two more things that came to mind that could help you
solve
> > your problem:
> >
> > 1. You could try to "svn switch" the workspace where you added the
> > file tree to its own child. In theory, the metadata should be
locally
> > present already, so no network traffic is required. If SVN is smart
enough to
> > reuse the existing files, this could be a very cheap operation.
> 
> Nice idea. I will try to check whether Subversion can handle that.

It seems that this idea works, at least with TortoiseSVN. It needs a
connection to the repository, but it displays "116 Bytes transferred" so
I think it did not actually transfer the pristine data.

Thanks for the suggestion!

Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Uli,

Von: Ulrich Eckhardt [mailto:ulrich.eckhardt@dominolaser.com]
> On Monday 22 August 2011, Markus Schaber wrote:
> > We need to add a new directory including files and properties to a
> > subversion repository "in-place".
> 
> There are two more things that came to mind that could help you solve
your
> problem:
> 
> 1. You could try to "svn switch" the workspace where you added the
file
> tree to its own child. In theory, the metadata should be locally
present
> already, so no network traffic is required. If SVN is smart enough to
re-
> use the existing files, this could be a very cheap operation.

Nice idea. I will try to check whether Subversion can handle that.
 
> 2. You could create the directory remotely, then check it out and add
the
> content there. This requires two commits, which isn't ideal, but by
> reversing the steps it avoids importing the content and then checking
out
> the whole content again.

This is exactly what I described as our current workaround for SVN 1.7,
or did I miss something?
 

Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: Single-commit import with properties and SVN 1.7

Posted by Ulrich Eckhardt <ul...@dominolaser.com>.
On Monday 22 August 2011, Markus Schaber wrote:
> We need to add a new directory including files and properties to a
> subversion repository "in-place".

There are two more things that came to mind that could help you solve your 
problem:

1. You could try to "svn switch" the workspace where you added the file tree 
to its own child. In theory, the metadata should be locally present already, 
so no network traffic is required. If SVN is smart enough to re-use the 
existing files, this could be a very cheap operation.

2. You could create the directory remotely, then check it out and add the 
content there. This requires two commits, which isn't ideal, but by reversing 
the steps it avoids importing the content and then checking out the whole 
content again.

Cheers!

Uli

-- 
ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/

**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************


AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Uli,

Von: Ulrich Eckhardt [mailto:ulrich.eckhardt@dominolaser.com]
> On Monday 22 August 2011, Markus Schaber wrote:
> > We need to add a new directory including files and properties to a
> > subversion repository "in-place".
> 
> Just to be sure: There are auto-props, which could help in combination
> with an import. There is also svn_load_dirs, in case you need this for
> maintaining vendor branches.

Auto-props won't help us, as we save object specific metadata
(Decoration for the repo browser, device configurations etc.) in the
properties.

Svn_load_dirs won't help us either, as our "source" is the CoDeSys
internal project database, and not a directory tree.

> > With SVN 1.6, the following did work: (I know that this is only an
> > artifact and was no documented / intended behavior.)
> > - Checkout the parent directory to a temporary place.
> > - create and svn add the data directory under the parent working
copy.
> > - svn add and svn propset all the children we need in the working
copy.
> > - svn commit the parent directory (to add everything in a single
> > commit.)
> > - move the data directory to the intended working copy place.
> > - delete the temporary parent directory.
> 
> Yes, there was some recent discussion whether to allow forking a child
> working copy from a parent working copy. If I remember correctly, this
is
> out of question for 1.7 and rather something for 1.8 or 1.9.

Forking the child tree would allow us to get rid of the second commit,
for the price of copying the data directory, instead of moving it. But
we could do the fork before populating all the subdirectories, so that
would be fast enough.

> > Is it theoretically possible with the new working copy architecture
to
> > allow the working copy root itself to be "scheduled for addition"?
> >
> > This could be the base for a nice feature for SVN 1.8, allowing both
> > "in-place import" and "import with properties", maybe some command
> > like "svn checkout --for-addition
> >
svn://destination/url/to/some/non/existing/directory/with/existing/paren
t".
> 
> +1
> 
> I never use import, because I always get the exact repository location
> wrong, either one too few or one too many directory levels. Having
> something import- like that creates a working copy would be a very
> interesting feature. It allows you to verify the target URL, set
> properties, exclude artifacts from builds or other version control
> systems, test stuff etc and do all that before committing.
> 
> I'm not sure it is feasible with the current or new WC design though,
> because additions are typically operations on the parent directory.
I'm
> confident the SVN team will figure out a solution though.

I consider this impossible with SVN 1.6 working copy format, as we need
the parent directory to exist for its metadata. But in SVN 1.7, we have
a central metadata storage in the workingcopy root, so I think it should
be doable.

Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: Single-commit import with properties and SVN 1.7

Posted by Ulrich Eckhardt <ul...@dominolaser.com>.
On Monday 22 August 2011, Markus Schaber wrote:
> We need to add a new directory including files and properties to a
> subversion repository "in-place".

Just to be sure: There are auto-props, which could help in combination with an 
import. There is also svn_load_dirs, in case you need this for maintaining 
vendor branches.

> With SVN 1.6, the following did work: (I know that this is only an
> artifact and was no documented / intended behavior.)
> - Checkout the parent directory to a temporary place.
> - create and svn add the data directory under the parent working copy.
> - svn add and svn propset all the children we need in the working copy.
> - svn commit the parent directory (to add everything in a single
> commit.)
> - move the data directory to the intended working copy place.
> - delete the temporary parent directory.

Yes, there was some recent discussion whether to allow forking a child working 
copy from a parent working copy. If I remember correctly, this is out of 
question for 1.7 and rather something for 1.8 or 1.9.


> Is it theoretically possible with the new working copy architecture to
> allow the working copy root itself to be "scheduled for addition"?
> 
> This could be the base for a nice feature for SVN 1.8, allowing both
> "in-place import" and "import with properties", maybe some command like
> "svn checkout --for-addition
> svn://destination/url/to/some/non/existing/directory/with/existing/parent".

+1

I never use import, because I always get the exact repository location wrong, 
either one too few or one too many directory levels. Having something import-
like that creates a working copy would be a very interesting feature. It 
allows you to verify the target URL, set properties, exclude artifacts from 
builds or other version control systems, test stuff etc and do all that before 
committing.

I'm not sure it is feasible with the current or new WC design though, because 
additions are typically operations on the parent directory. I'm confident the 
SVN team will figure out a solution though.

Greetings!

Uli
**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************


AW: AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Andreas,

Von: Andreas Krey [mailto:a.krey@gmx.de]
> On Mon, 22 Aug 2011 18:17:48 +0000, Markus Schaber wrote:
> ...
> > I cannot create a working copy directly in the project directory when
> > the project directory is just to be created with the import.
> 
> Oops, forget it. I misunderstood the requirement.

We also have some users which commit into an existing empty directory - then the whole thing is no problem. But in some cases our users want to create the project directory with the checkin.

> Anyway, is throwing away the import sandbox and checking out the project
> dir too expensive?

As our working copies for existing projects may be several hundred MB with several thousand files, the time problem is considered worse than the two-commit approach we do now.


Mit freundlichen Grüßen

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Entwicklung
Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys Internet-Forum: http://forum.3s-software.com

Geschäftsführer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915


Re: AW: Single-commit import with properties and SVN 1.7

Posted by Andreas Krey <a....@gmx.de>.
On Mon, 22 Aug 2011 18:17:48 +0000, Markus Schaber wrote:
...
> I cannot create a working copy directly in the project directory when
> the project directory is just to be created with the import.

Oops, forget it. I misunderstood the requirement.

Anyway, is throwing away the import sandbox and checking out the project
dir too expensive?

Andreas

AW: AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Andreas,

Von: Andreas Krey [mailto:a.krey@gmx.de]
> On Mon, 22 Aug 2011 18:01:34 +0000, Markus Schaber wrote:
> ....
> > > What does not work that worked with 1.6?
> >
> > Those steps work nice, but they leave us with a working copy having
> > the parent of the project directory as its root, instead of the
> > project directory itself.
> 
> Is there a reason that you can't do your import directly in the
project
> directory, and is it prohibitive to just 'svn up' and throw away the
temp
> dir instead of moving the tree into the project dir?

I cannot create a working copy directly in the project directory when
the project directory is just to be created with the import. This is why
we currently need an extra commit to create the project directory, as I
described it in my sequence of steps for SVN 1.7.

What exactly do you mean with "svn up" in this context?


Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: AW: Single-commit import with properties and SVN 1.7

Posted by Andreas Krey <a....@gmx.de>.
On Mon, 22 Aug 2011 18:01:34 +0000, Markus Schaber wrote:
....
> > What does not work that worked with 1.6?
> 
> Those steps work nice, but they leave us with a working copy having the
> parent of the project directory as its root, instead of the project
> directory itself.

Is there a reason that you can't do your import directly in the project
directory, and is it prohibitive to just 'svn up' and throw away the
temp dir instead of moving the tree into the project dir?

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Mark,

Von: Mark Phippard [mailto:markphip@gmail.com] 

> On Mon, Aug 22, 2011 at 12:01 PM, Markus Schaber <m....@3s-software.com> wrote:
>> Those steps work nice, but they leave us with a working copy having the
>> parent of the project directory as its root, instead of the project
>> directory itself. This is why our Code for 1.6 had the "detach" step
>> which you left out in your commands, and which won't work with 1.7
>> anymore.

> You said detach was optional before, but that is OK.  The conversation has basically come back to the point I made in the original email.

With "optional", I wanted to express that we do not insist on detaching, if we find a different way for an in-place import leaving us with the correct parent directory (as in the proposal to have a working copy root itself scheduled for addition).

One of our goals is to keep the directory hierarchy as flat as possible, as the whole working copy itself lives in %APPDATA%\Local\Temp\ and the project hierarchies can be of arbitrary depth, with long names for the objects. (Some of our customers seem to do weird things, so the windows 255 character path limit is a serious concern for some of them...)

Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: Single-commit import with properties and SVN 1.7

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Aug 22, 2011 at 12:01 PM, Markus Schaber
<m....@3s-software.com>wrote:

> Those steps work nice, but they leave us with a working copy having the
> parent of the project directory as its root, instead of the project
> directory itself. This is why our Code for 1.6 had the "detach" step
> which you left out in your commands, and which won't work with 1.7
> anymore.
>


You said detach was optional before, but that is OK.  The conversation has
basically come back to the point I made in the original email.

Nothing has changed about in-place import.  That just happens to be the
tecnhique you used for your working copy.  Your real issue is that you can
no longer simply detach a working copy in 1.7.  That has been discussed on
this list before.  You are correct, you can't.  For now, there is a Python
script that can be used to do this.  Perhaps in a future release there will
be a formal subcommand.

Finally, keep in mind that I could have begun my recipe like this:

$ svn co --depth-empty url://server/repos/parent
$ mkdir child
$ svn add child
etc...

This would still mean the parent folder is the root of the WC, but it is at
least an empty parent folder if you are trying to avoid having other content
in the WC.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Mark,

Von: Mark Phippard [mailto:markphip@gmail.com] 

> On Mon, Aug 22, 2011 at 11:31 AM, Markus Schaber
<m....@3s-software.com> wrote:

>> We do not insist in the "detach" step. The "detach" step just was
part of the workaround to get an inplace-import with SVN 1.6, just as
the second commit is part our workaround for SVN 1.7.

>>We need an inplace-import as we did make the decision to store object
metadata in SVN properties. (Maybe that design decision was wrong.
Currently, we still could change that design, as we did not release yet.
All this is part of our mapping of the CoDeSys project database to a
file-and-directory tree as needed by subversion.) Another reason for the
in-place import is that it makes no sense to transfer the data over the
network twice.


> I am confused about what does not work with an in-place import in 1.7.

> [Steps for in-place import]

> What does not work that worked with 1.6?

Those steps work nice, but they leave us with a working copy having the
parent of the project directory as its root, instead of the project
directory itself. This is why our Code for 1.6 had the "detach" step
which you left out in your commands, and which won't work with 1.7
anymore.


Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 


Re: Single-commit import with properties and SVN 1.7

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Aug 22, 2011 at 11:31 AM, Markus Schaber
<m....@3s-software.com>wrote:

>
> We do not insist in the "detach" step. The "detach" step just was part of
> the workaround to get an inplace-import with SVN 1.6, just as the second
> commit is part our workaround for SVN 1.7.
>
> We need an inplace-import as we did make the decision to store object
> metadata in SVN properties. (Maybe that design decision was wrong.
> Currently, we still could change that design, as we did not release yet. All
> this is part of our mapping of the CoDeSys project database to a
> file-and-directory tree as needed by subversion.) Another reason for the
> in-place import is that it makes no sense to transfer the data over the
> network twice.
>


I am confused about what does not work with an in-place import in 1.7.

$ svnadmin create repos
$ svn co file:///`pwd`/repos wc
Checked out revision 0.
$ mkdir wc/folder
$ echo foo > wc/folder/file.txt
$ svn add wc/folder
A         wc/folder
A         wc/folder/file.txt
$ svn ps customprop customvalue wc/folder
property 'customprop' set on 'wc/folder'
$ svn ps customprop customvalue wc/folder/file.txt
property 'customprop' set on 'wc/folder/file.txt'
$ svn ci -m "Commit changes" wc
Adding         wc/folder
Adding         wc/folder/file.txt
Transmitting file data .
Committed revision 1.
$ svn pl file:///`pwd`/repos/folder
Properties on 'file:///Users/markphip/tests/repos/folder':
  customprop
$ svn pl file:///`pwd`/repos/folder/file.txt
Properties on 'file:///Users/markphip/tests/repos/folder/file.txt':
  svn:mime-type
  customprop
  svn:eol-style

What does not work that worked with 1.6?

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Mark,

Von: Mark Phippard [mailto:markphip@gmail.com] 

> On Mon, Aug 22, 2011 at 6:00 AM, Markus Schaber <m....@3s-software.com> wrote:

>> We need to add a new directory including files and properties to a
>> subversion repository "in-place".
>> 
>> With SVN 1.6, the following did work: (I know that this is only an
>> artifact and was no documented / intended behavior.)
>> - Checkout the parent directory to a temporary place.
>> - create and svn add the data directory under the parent working copy.
>> - svn add and svn propset all the children we need in the working copy.
>> - svn commit the parent directory (to add everything in a single
>>   commit.)
>> - move the data directory to the intended working copy place.
>> - delete the temporary parent directory.
>>
>> With SVN 1.7, I only see a way to do this with 2 commits:
>> - svn remote add the data directory. (First commit)
>> - checkout the data directory
>> - fill the data directory with contents (files and properties)
>> - svn commit the data directory. (Second commit).
>> (This is analogeous to the "in-place import" in the FAQ.)
>>
>> Is it theoretically possible with the new working copy architecture to
>> allow the working copy root itself to be "scheduled for addition"?

> I am confused about why the exact same sequence of commands does not work for you with 1.7.  What does the location of the .svn folder have to do with any of this?

The "Detaching" by moving the subdirectory to the desired place and then throwing the parent directory will not work with SVN 1.7.

> The problem to me, does not seem to be the import, which you can do with one commit just fine.  It seems to be that after it is done, you want to move this folder somewhere else to use it?  That can be done using the detach script to copy it to the new location:
> http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/detach.py 

We do not insist in the "detach" step. The "detach" step just was part of the workaround to get an inplace-import with SVN 1.6, just as the second commit is part our workaround for SVN 1.7.

We need an inplace-import as we did make the decision to store object metadata in SVN properties. (Maybe that design decision was wrong. Currently, we still could change that design, as we did not release yet. All this is part of our mapping of the CoDeSys project database to a file-and-directory tree as needed by subversion.) Another reason for the in-place import is that it makes no sense to transfer the data over the network twice.

And the "moving" of the workingcopy was simplified use case - in fact, the working copy is zipped and packed into the project database file when the project is closed, so that the .project file can be transferred as normal and carries the working copy with it in a piggyback style. When the project is opened again, the working copy is unzipped into a new temporary directory.

Detaching via a python script is nice, but it has the disadvantage that we would need to deliver cPython as part of our software. (We currently deliver IronPython, but this has no supported subversion bindings yet.) 


Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Re: Single-commit import with properties and SVN 1.7

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Aug 22, 2011 at 6:00 AM, Markus Schaber
<m....@3s-software.com>wrote:

> Hi,
>
> We need to add a new directory including files and properties to a
> subversion repository "in-place".
>
> With SVN 1.6, the following did work: (I know that this is only an
> artifact and was no documented / intended behavior.)
> - Checkout the parent directory to a temporary place.
> - create and svn add the data directory under the parent working copy.
> - svn add and svn propset all the children we need in the working copy.
> - svn commit the parent directory (to add everything in a single
> commit.)
> - move the data directory to the intended working copy place.
> - delete the temporary parent directory.
>
> With SVN 1.7, I only see a way to do this with 2 commits:
> - svn remote add the data directory. (First commit)
> - checkout the data directory
> - fill the data directory with contents (files and properties)
> - svn commit the data directory. (Second commit).
> (This is analogeous to the "in-place import" in the FAQ.)
>
> Is it theoretically possible with the new working copy architecture to
> allow the working copy root itself to be "scheduled for addition"?
>
>
I am confused about why the exact same sequence of commands does not work
for you with 1.7.  What does the location of the .svn folder have to do with
any of this?

The problem to me, does not seem to be the import, which you can do with one
commit just fine.  It seems to be that after it it done, you want to move
this folder somewhere else to use it?  That can be done using the detach
script to copy it to the new location:

http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/detach.py



-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

AW: Single-commit import with properties and SVN 1.7

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Mark,

Von: Mark Phippard [mailto:markphip@gmail.com] 
>> [ in place checkout]

> This also should work:
> 
> $ svn co --depth=empty url://server/repos/parent tmp
> $ fill with data directory and files
> $ svn add data
> $ set properties
> $ svn ci -m Commit the data folder
> 
> $ svn co url://server/repos/parent/data  real_dir

Yes, but it comes at the price of transferring the data twice over the network. And some working copies might be rather large.

So, for now, the two-commit solution seems to be the best workaround.

Best regards

Markus Schaber
-- 
___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: Single-commit import with properties and SVN 1.7

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Aug 22, 2011 at 6:00 AM, Markus Schaber
<m....@3s-software.com>wrote:


> We need to add a new directory including files and properties to a
> subversion repository "in-place".
>
> With SVN 1.6, the following did work: (I know that this is only an
> artifact and was no documented / intended behavior.)
> - Checkout the parent directory to a temporary place.
> - create and svn add the data directory under the parent working copy.
> - svn add and svn propset all the children we need in the working copy.
> - svn commit the parent directory (to add everything in a single
> commit.)
> - move the data directory to the intended working copy place.
> - delete the temporary parent directory.
>
> With SVN 1.7, I only see a way to do this with 2 commits:
> - svn remote add the data directory. (First commit)
> - checkout the data directory
> - fill the data directory with contents (files and properties)
> - svn commit the data directory. (Second commit).
> (This is analogeous to the "in-place import" in the FAQ.)
>

This also should work:

$ svn co --depth=empty url://server/repos/parent tmp
$ fill with data directory and files
$ svn add data
$ set properties
$ svn ci -m Commit the data folder

$ svn co url://server/repos/parent/data  real_dir


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/