move of directory that is scheduled for add does not move properties

View: New views
6 Messages — Rating Filter:   Alert me  

move of directory that is scheduled for add does not move properties

by Donald Kwakkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi All,

 

When I move a directory that is scheduled for add with properties, the properties are not moved along.

 

The actions (in svn commands):

 

mkdir x

svn add x

svn ps mykey myval x

svn rename x y

svn pl y

 

Properties on 'y':

  mykey

 

When I program the same using svn kit there is no property on ‘y’.

 

I suspect below line of SVNMoveClient:

 

} else if (!srcEntry.isCopied() && !srcEntry.isScheduledForAddition()) {

                   

 

Is this a bug?

 

Kind regards Donald



The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.

Re: move of directory that is scheduled for add does not move properties

by Alexander Sinyushkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Donald,

Yes, it seems to be a bug in SVNMoveClient.

However SVNMoveClient was introduced for special case move scenarios
that didn't used to be supported with earlier versions of Subversion. I
think we should probable
fall back to using a standard SVNCopyClient for simple cases in
SVNMoveClient.doMove(File, File),
like wc->wc moves withing the same working copy.

So, I would recommend you to use SVNCopyClient.

For example,

SVNCopySource cs = new SVNCopySource(SVNRevision.UNDEFINED,
SVNRevision.WORKING, new File("/home/alex/workspace/tmp/wc1/x"));
clientManager.getCopyClient().doCopy(new SVNCopySource[] { cs }, new
File("/home/alex/workspace/tmp/wc1/y"), true, false, false);

This should move scheduled for addition 'x' to 'y' with all its properties.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!



Donald Kwakkel wrote:

>
> Hi All,
>
> When I move a directory that is scheduled for add with properties, the
> properties are not moved along.
>
> The actions (in svn commands):
>
> mkdir x
>
> svn add x
>
> svn ps mykey myval x
>
> svn rename x y
>
> svn pl y
>
> Properties on 'y':
>
> mykey
>
> When I program the same using svn kit there is no property on ‘y’.
>
> I suspect below line of SVNMoveClient:
>
> } *else* *if* (!srcEntry.isCopied() &&
> !srcEntry.isScheduledForAddition()) {
>
> Is this a bug?
>
> Kind regards Donald
>
>
> ------------------------------------------------------------------------
> The information contained in this communication is confidential,
> intended solely for the use of the individual or entity to whom it is
> addressed and may be legally privileged and protected by professional
> secrecy. Access to this message by anyone else is unauthorized. If you
> are not the intended recipient, any disclosure, copying, or
> distribution of the message, or any action or omission taken by you in
> reliance on it is prohibited and may be unlawful. Please immediately
> contact the sender if you have received this message in error. This
> email does not constitute any commitment from Cordys Holding BV or any
> of its subsidiaries except when expressly agreed in a written
> agreement between the intended recipient and Cordys Holding BV or its
> subsidiaries. Cordys is neither liable for the proper and complete
> transmission of the information contained in this communication nor
> for any delay in its receipt. Cordys does not guarantee that the
> integrity of this communication has been maintained nor that the
> communication is free of viruses, interceptions or interference. If
> you are not the intended recipient of this communication please return
> the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


RE: move of directory that is scheduled for add does not move properties

by Donald Kwakkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Alexander.

If I use svn copy client, is it able to propagate merge tracking information?

Because svn command line client doesn't:

WARNING: For compatibility with previous versions of Subversion,
copies performed using two working copy paths (WC -> WC) will not
contact the repository.  As such, they may not, by default, be able
to propagate merge tracking information from the source of the copy
to the destination.

Kind regards, Donald

-----Original Message-----
From: Alexander Sinyushkin [mailto:Alexander.Sinyushkin@...]
Sent: Thursday, November 12, 2009 3:55 PM
To: svnkit-users@...
Subject: Re: move of directory that is scheduled for add does not move properties

Hi Donald,

Yes, it seems to be a bug in SVNMoveClient.

However SVNMoveClient was introduced for special case move scenarios
that didn't used to be supported with earlier versions of Subversion. I
think we should probable
fall back to using a standard SVNCopyClient for simple cases in
SVNMoveClient.doMove(File, File),
like wc->wc moves withing the same working copy.

So, I would recommend you to use SVNCopyClient.

For example,

SVNCopySource cs = new SVNCopySource(SVNRevision.UNDEFINED,
SVNRevision.WORKING, new File("/home/alex/workspace/tmp/wc1/x"));
clientManager.getCopyClient().doCopy(new SVNCopySource[] { cs }, new
File("/home/alex/workspace/tmp/wc1/y"), true, false, false);

This should move scheduled for addition 'x' to 'y' with all its properties.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!



Donald Kwakkel wrote:

>
> Hi All,
>
> When I move a directory that is scheduled for add with properties, the
> properties are not moved along.
>
> The actions (in svn commands):
>
> mkdir x
>
> svn add x
>
> svn ps mykey myval x
>
> svn rename x y
>
> svn pl y
>
> Properties on 'y':
>
> mykey
>
> When I program the same using svn kit there is no property on 'y'.
>
> I suspect below line of SVNMoveClient:
>
> } *else* *if* (!srcEntry.isCopied() &&
> !srcEntry.isScheduledForAddition()) {
>
> Is this a bug?
>
> Kind regards Donald
>
>
> ------------------------------------------------------------------------
> The information contained in this communication is confidential,
> intended solely for the use of the individual or entity to whom it is
> addressed and may be legally privileged and protected by professional
> secrecy. Access to this message by anyone else is unauthorized. If you
> are not the intended recipient, any disclosure, copying, or
> distribution of the message, or any action or omission taken by you in
> reliance on it is prohibited and may be unlawful. Please immediately
> contact the sender if you have received this message in error. This
> email does not constitute any commitment from Cordys Holding BV or any
> of its subsidiaries except when expressly agreed in a written
> agreement between the intended recipient and Cordys Holding BV or its
> subsidiaries. Cordys is neither liable for the proper and complete
> transmission of the information contained in this communication nor
> for any delay in its receipt. Cordys does not guarantee that the
> integrity of this communication has been maintained nor that the
> communication is free of viruses, interceptions or interference. If
> you are not the intended recipient of this communication please return
> the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: move of directory that is scheduled for add does not move properties

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Donald,

SVNKit behaves the same way as native client by default, but, if I'm not
mistaken there once was a system property that you may set in order to
force SVNKit to contact server on local moves and copies to make sure
all mergeinfo is propagated. Now I couldn't find this property in the
1.3.1 version, may be it is in trunk version only. I'm out of the office
now and I'll check it later for you. Probably we could restore this
behavior as an optional.

On the other side all the mergeinfo that already exist in the workinng
copy (on the parent directories) is propagated by the local move. In
case wroking copy root is a branch or trunk root and there is no
mergeinfo set for the directories above working copy root, then wc
information on merges is enough for the move or copy operation.

Alexander Kitaev.

Donald Kwakkel wrote:

> Thanks Alexander.
>
> If I use svn copy client, is it able to propagate merge tracking information?
>
> Because svn command line client doesn't:
>
> WARNING: For compatibility with previous versions of Subversion,
> copies performed using two working copy paths (WC -> WC) will not
> contact the repository.  As such, they may not, by default, be able
> to propagate merge tracking information from the source of the copy
> to the destination.
>
> Kind regards, Donald
>
> -----Original Message-----
> From: Alexander Sinyushkin [mailto:Alexander.Sinyushkin@...]
> Sent: Thursday, November 12, 2009 3:55 PM
> To: svnkit-users@...
> Subject: Re: move of directory that is scheduled for add does not move properties
>
> Hi Donald,
>
> Yes, it seems to be a bug in SVNMoveClient.
>
> However SVNMoveClient was introduced for special case move scenarios
> that didn't used to be supported with earlier versions of Subversion. I
> think we should probable
> fall back to using a standard SVNCopyClient for simple cases in
> SVNMoveClient.doMove(File, File),
> like wc->wc moves withing the same working copy.
>
> So, I would recommend you to use SVNCopyClient.
>
> For example,
>
> SVNCopySource cs = new SVNCopySource(SVNRevision.UNDEFINED,
> SVNRevision.WORKING, new File("/home/alex/workspace/tmp/wc1/x"));
> clientManager.getCopyClient().doCopy(new SVNCopySource[] { cs }, new
> File("/home/alex/workspace/tmp/wc1/y"), true, false, false);
>
> This should move scheduled for addition 'x' to 'y' with all its properties.
>
> ----
> Alexander Sinyushkin,
> TMate Software,
> http://svnkit.com/ - Java [Sub]Versioning Library!
> http://sqljet.com/ - Java SQLite Library!
>
>
>
> Donald Kwakkel wrote:
>> Hi All,
>>
>> When I move a directory that is scheduled for add with properties, the
>> properties are not moved along.
>>
>> The actions (in svn commands):
>>
>> mkdir x
>>
>> svn add x
>>
>> svn ps mykey myval x
>>
>> svn rename x y
>>
>> svn pl y
>>
>> Properties on 'y':
>>
>> mykey
>>
>> When I program the same using svn kit there is no property on 'y'.
>>
>> I suspect below line of SVNMoveClient:
>>
>> } *else* *if* (!srcEntry.isCopied() &&
>> !srcEntry.isScheduledForAddition()) {
>>
>> Is this a bug?
>>
>> Kind regards Donald
>>
>>
>> ------------------------------------------------------------------------
>> The information contained in this communication is confidential,
>> intended solely for the use of the individual or entity to whom it is
>> addressed and may be legally privileged and protected by professional
>> secrecy. Access to this message by anyone else is unauthorized. If you
>> are not the intended recipient, any disclosure, copying, or
>> distribution of the message, or any action or omission taken by you in
>> reliance on it is prohibited and may be unlawful. Please immediately
>> contact the sender if you have received this message in error. This
>> email does not constitute any commitment from Cordys Holding BV or any
>> of its subsidiaries except when expressly agreed in a written
>> agreement between the intended recipient and Cordys Holding BV or its
>> subsidiaries. Cordys is neither liable for the proper and complete
>> transmission of the information contained in this communication nor
>> for any delay in its receipt. Cordys does not guarantee that the
>> integrity of this communication has been maintained nor that the
>> communication is free of viruses, interceptions or interference. If
>> you are not the intended recipient of this communication please return
>> the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
> For additional commands, e-mail: svnkit-users-help@...
>
>
> The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been
maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
> For additional commands, e-mail: svnkit-users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


move - change - move back

by Donald Kwakkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

Does someone know if it is possible to move a commited directory, change it and move it back?

Something like this:

mkdir f
svn add f
svn commit --message message .
svn rename f g
echo "some text" > g\x.txt
svn add g\x.txt
svn rename g f

The last step is not possible:

> svn: Cannot copy to 'f' as it is scheduled for deletion

Is there another way to do something like this with svnkit?

Kind regards, Donald


The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: move - change - move back

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Donald,

>> svn: Cannot copy to 'f' as it is scheduled for deletion
>
> Is there another way to do something like this with svnkit?
What you may do using standard Subversion operations is to add deleted
directory back (thus making it 'replaced'), then add files. This way
however, added directory will be treated as new, no history will be
preserved.

May be in your case it makes sense just to copy directory (without using
Subversion) if you need it in other location, then copy it back again
without using Subversion or SVNKit.

Internally, SVNKit could do what you like (there is no open API for that
however), but from your example it looks like actually there is no need
to move directory 'g' around...

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!

Donald Kwakkel wrote:

> Hi All,
>
> Does someone know if it is possible to move a commited directory, change it and move it back?
>
> Something like this:
>
> mkdir f
> svn add f
> svn commit --message message .
> svn rename f g
> echo "some text" > g\x.txt
> svn add g\x.txt
> svn rename g f
>
> The last step is not possible:
>
>> svn: Cannot copy to 'f' as it is scheduled for deletion
>
> Is there another way to do something like this with svnkit?
>
> Kind regards, Donald
>
>
> The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been
 maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
> For additional commands, e-mail: svnkit-users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...