[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: multiple "svn import" behavior

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-01-11 08:52:43 CET

On Fri, Jan 11, 2002 at 12:15:18AM -0500, Guillaume Boissiere wrote:
>...
> > > I tried doing this:
> > > svncreate myproject
> > > svn import file:///myproject archive/myproject-v1.0 topdir
> > > svn import file:///myproject archive/myproject-v1.1 topdir
> > > svn import file:///myproject archive/myproject-v1.2 topdir
>...
> Uhmm, I think it would be a worthy feature to add to Subversion. It is not
> really a merge, it is "replace whatever was in this directory of the
> repository by what is in the local directory I am importing".
> It seems to me like it would be a nice new behavior for import instead of
> erroring out.
> Comments?
>...
> So to go back to my question, what is the simplest way to accomplish my
> goals?

Something like this:

$ svnadmin create myproject
$ svn import file:///myproject archive/myproject-v1.0 topdir
$ cd somewhere
$ svn co -n file:///myproject
$ svn rm topdir
$ rm -rf topdir
$ cp -r archive/myproject-v1.1 topdir
$ svn add topdir
$ svn commit
...

Alternatively, you could do:

$ svn import file:///myproject archive/myproject-v1.0 topdir
$ svn rm file:///myproject/topdir
$ svn import file:///myproject archive/myproject-v1.1 topdir
...

However, that would commit a revision with no "topdir". Using the working
copy allows you to replace topdir with complete new contents, with no
intervening revision.

Note, however, that in all of these suggested solutions, there is *no*
sharing of content between v1.x. To Subversion, they all look entirely new
and unrelated.

To do a real "merge" where you actually have related content, you must use a
working copy and do the merging process on the client side before
committing.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:56 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.