You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@gmail.com> on 2008/01/15 15:28:09 UTC

New 1.5 API to copy/move multiple paths

The copy/move API has been enhanced in 1.5 so that you can copy/move
multiple items in a single transaction.  This is pretty nice.  In
Subclipse, this is allowing us to provide a lot better branch/tag UI.
In Eclipse development, it is really common to have multiple related
projects in the same repository.  For example, Subclipse is made up of
almost a dozen Eclipse projects from the same repository.  With the
new API I can now easily tag them all with a single transaction.

The problem is that I cannot do it by copying from the WC.  It works
fine when doing it via URL, but not the WC.  This is not strictly
speaking a bug, but more of a limitation in Subversion.  Really is
just a new incarnation of this problem which already exists for
commit:

http://subversion.tigris.org/issues/show_bug.cgi?id=2381

In Eclipse, each of my checked out projects lives in the same parent
folder locally, but that folder is not itself a WC.  Essentially,
these WC's are all disconnected.  So this is preventing me from
copying them all in a single transaction.

For commit, I can workaround this limitation with a hack.  Before
doing the commit, I create a dummy .svn folder in the parent, and then
delete it after the commit.  This does not work for copy.  When I try
the same hack (I actually do svn co --depth=empty to create the .svn
first) I get a crash.  Here is the trace.

So my question is simply whether this restriction that all of the
folders share a WC parent can be relaxed.


Thread 14 Crashed:
0   libsvn_client-1.0.dylib      	0x395f0869 wc_to_repos_copy + 1127
1   libsvn_client-1.0.dylib      	0x395f2ce3 setup_copy + 2718
2   libsvn_client-1.0.dylib      	0x395f2e62 svn_client_copy4 + 178
3   libsvnjavahl-1.0.dylib       	0x390170b6
SVNClient::copy(CopySources&, char const*, char const*, bool, bool) +
318 (SVNClient.cpp:425)
4   libsvnjavahl-1.0.dylib       	0x39021af2
Java_org_tigris_subversion_javahl_SVNClient_copy + 378
(org_tigris_subversion_javahl_SVNClient.cpp:558)
5   <<00000000>> 	0x04590281 0 + 72942209
6   <<00000000>> 	0x0458acd9 0 + 72920281
7   <<00000000>> 	0x0458acd9 0 + 72920281
8   <<00000000>> 	0x0458a9d3 0 + 72919507
9   <<00000000>> 	0x0458a9d3 0 + 72919507
10  <<00000000>> 	0x0458a9d3 0 + 72919507
11  <<00000000>> 	0x0458acd9 0 + 72920281
12  <<00000000>> 	0x0458aaaa 0 + 72919722
13  <<00000000>> 	0x0458aaaa 0 + 72919722
14  <<00000000>> 	0x0458aaaa 0 + 72919722
15  <<00000000>> 	0x0458821f 0 + 72909343
16  libclient.dylib              	0x9b9d1f8a jio_snprintf + 396118
17  libclient.dylib              	0x9b9de667 JVM_StartThread + 2397
18  libclient.dylib              	0x9b9de579 JVM_StartThread + 2159
19  libclient.dylib              	0x9b9de4bd JVM_StartThread + 1971
20  libclient.dylib              	0x9b9de3e1 JVM_StartThread + 1751
21  libclient.dylib              	0x9b96954b JNI_CreateJavaVM_Impl + 52525
22  libSystem.B.dylib            	0x90024227 _pthread_body + 84



-- 
Thanks

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

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

Re: New 1.5 API to copy/move multiple paths

Posted by Mark Phippard <ma...@gmail.com>.
On Jan 15, 2008 8:31 PM, Karl Fogel <kf...@red-bean.com> wrote:
> "Mark Phippard" <ma...@gmail.com> writes:
> > In Eclipse, each of my checked out projects lives in the same parent
> > folder locally, but that folder is not itself a WC.  Essentially,
> > these WC's are all disconnected.  So this is preventing me from
> > copying them all in a single transaction.
> >
> > For commit, I can workaround this limitation with a hack.  Before
> > doing the commit, I create a dummy .svn folder in the parent, and then
> > delete it after the commit.  This does not work for copy.  When I try
> > the same hack (I actually do svn co --depth=empty to create the .svn
> > first) I get a crash.  Here is the trace.
> >
> > So my question is simply whether this restriction that all of the
> > folders share a WC parent can be relaxed.
>
> The 1.5 solution to this would be sparse directories: the parent would
> be a wc, but at depth-empty or something, and then you'd include just
> the subdirs (i.e., projects) you want beneath that.
>
> It sounds like you tried that, but via an unusual route: you already
> had the subdirs, and you sort of "inserted" the parent .svn in place
> at depth-empty.  Of course it shouldn't crash, but I'm not sure I'd
> expect it to work either (though it would be nice if it did).
>
> Can you make a script that causes this crash using the cmdline client?

It isn't that simple.  I cannot use sparse directories for this.  The
parent folder in our case is the Eclipse workspace.  We cannot really
alter it.  Besides, your workspace could have projects from many
different repositories.

In my example, I just used the --depth=empty as a shortcut for making
a syntactically valid .svn folder.  In my case the folder I checked
out was not even the parent of these folders.

For commit, the mere presence of a folder named .svn is all you need.
The only exception is if committing a prop change on one of the
top-level folders.  In that case, you need to have a format and
entries file that parses correctly.  Other than that, the contents do
not seem to matter.

I was hoping that copy could either not recreate this restriction at
all, or at least accept the same hack.

Mark



-- 
Thanks

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

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

Re: New 1.5 API to copy/move multiple paths

Posted by Karl Fogel <kf...@red-bean.com>.
"Mark Phippard" <ma...@gmail.com> writes:
> In Eclipse, each of my checked out projects lives in the same parent
> folder locally, but that folder is not itself a WC.  Essentially,
> these WC's are all disconnected.  So this is preventing me from
> copying them all in a single transaction.
>
> For commit, I can workaround this limitation with a hack.  Before
> doing the commit, I create a dummy .svn folder in the parent, and then
> delete it after the commit.  This does not work for copy.  When I try
> the same hack (I actually do svn co --depth=empty to create the .svn
> first) I get a crash.  Here is the trace.
>
> So my question is simply whether this restriction that all of the
> folders share a WC parent can be relaxed.

The 1.5 solution to this would be sparse directories: the parent would
be a wc, but at depth-empty or something, and then you'd include just
the subdirs (i.e., projects) you want beneath that.

It sounds like you tried that, but via an unusual route: you already
had the subdirs, and you sort of "inserted" the parent .svn in place
at depth-empty.  Of course it shouldn't crash, but I'm not sure I'd
expect it to work either (though it would be nice if it did).

Can you make a script that causes this crash using the cmdline client?

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

Re: New 1.5 API to copy/move multiple paths

Posted by Mark Phippard <ma...@gmail.com>.
On Jan 27, 2008 5:09 PM, Julian Foad <ju...@btopenworld.com> wrote:
> Mark Phippard wrote:
> [...]
> > just a new incarnation of this problem which already exists for
> > commit:
> >
> > http://subversion.tigris.org/issues/show_bug.cgi?id=2381
>
> (Issue summary: "Cannot commit multiple WC paths which lack a common parent
> directory".)
>
> > In Eclipse, each of my checked out projects lives in the same parent
> > folder locally, but that folder is not itself a WC.  Essentially,
> > these WC's are all disconnected.  So this is preventing me from
> > copying them all in a single transaction.
> [...]
> > So my question is simply whether this restriction that all of the
> > folders share a WC parent can be relaxed.
>
>  From my very sketchy knowledge of how these things work, this sounds like a
> reasonable request. The symptom with "copy" is similar to what issue #2381
> reports with "commit", so there's hope for a common solution.
>
> Please raise an issue and cross-reference it to/from #2381. A good summary
> would be "Cannot copy multiple WC paths which lack a common parent directory".
>
>
> > For commit, I can workaround this limitation with a hack.  Before
> > doing the commit, I create a dummy .svn folder in the parent, and then
> > delete it after the commit.  This does not work for copy.  When I try
> > the same hack (I actually do svn co --depth=empty to create the .svn
> > first) I get a crash.  Here is the trace.
>
> Please can you try to post a reproduction recipe for this crash. If you're
> using standard "svn" commands it shouldn't crash even if the behaviour you want
> isn't supported.

I entered issue 3083:
http://subversion.tigris.org/issues/show_bug.cgi?id=3083

It contains a "verbal reproduction recipe" for the crash.  I did
confirm the command line will crash in the same scenario.

-- 
Thanks

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

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

Re: New 1.5 API to copy/move multiple paths

Posted by Julian Foad <ju...@btopenworld.com>.
Mark Phippard wrote:
[...]
> just a new incarnation of this problem which already exists for
> commit:
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2381

(Issue summary: "Cannot commit multiple WC paths which lack a common parent 
directory".)

> In Eclipse, each of my checked out projects lives in the same parent
> folder locally, but that folder is not itself a WC.  Essentially,
> these WC's are all disconnected.  So this is preventing me from
> copying them all in a single transaction.
[...]
> So my question is simply whether this restriction that all of the
> folders share a WC parent can be relaxed.

 From my very sketchy knowledge of how these things work, this sounds like a 
reasonable request. The symptom with "copy" is similar to what issue #2381 
reports with "commit", so there's hope for a common solution.

Please raise an issue and cross-reference it to/from #2381. A good summary 
would be "Cannot copy multiple WC paths which lack a common parent directory".


> For commit, I can workaround this limitation with a hack.  Before
> doing the commit, I create a dummy .svn folder in the parent, and then
> delete it after the commit.  This does not work for copy.  When I try
> the same hack (I actually do svn co --depth=empty to create the .svn
> first) I get a crash.  Here is the trace.

Please can you try to post a reproduction recipe for this crash. If you're 
using standard "svn" commands it shouldn't crash even if the behaviour you want 
isn't supported.

- Julian

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