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

Re: Merging non-versioned directory into versioned one

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Tue, 28 Oct 2008 12:40:31 +0100

On Monday 27 October 2008, Trevor Harmon wrote:
> Occasionally I come across an unfortunate scenario where I've got two
> copies of a directory: an old one checked into a repository, and a
> newer one that happens to exist entirely outside of Subversion (not in
> a repository or working copy). The new one has just a few scattered
> changes compared to the old one.
>
> My goal is to merge the two directories so that the old one is updated
> with all of the new's changes.

There are two scenarios here, depending on whether the state in the repository
has evolved on its own or not. If it evolved, I would simply create a working
copy of the version when the non-version directory was forked. I'd then
simply copy over the non-versioned directory and then update to HEAD in order
to merge in the changes that occurred since the fork. Note that if there were
files or directories added, this might require further manual handholding.

If the repository didn't change since the the independent copy was forked, you
can skip the whole checking out at a certain revision and updating to HEAD,
just copy over the directory and possibly manually apply added/watch for
deleted files.

You could also automatically load the independent directory using
svn_load_dirs, which is designed to create vendor branches.

> Instead, what I've been doing is this:
>
> svn remove mydir
> svn ci mydir
> [copy the new mydir into current directory]
> svn add mydir
> svn ci mydir
>
> Although this works, it has the disadvantage of splitting what should
> be a single repository commit into two.

Not only that, but to SVN, the deleted dir and the one added are two separate
entities which have nothing to do with each other. IOW the history line that
connects those two is severed, too! Oh, and any delta-algorithms that would
have reduced the data, both storage and traffic, are not applied either.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
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. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-28 12:40:57 CET

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

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