Quoting Trevor Harmon <trevor_at_vocaro.com>:
> Hi,
>
> 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. With a single file, this task would be
> easy: I'd simply replace the working copy with the new file, then check
> in the change. With a directory, however, it's a lot more complicated.
> I can't just replace the old version's working copy with the new
> directory because that would wipe out the .svn metadata. 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
This procedure would result in the "EOLife" of any artifacts in mydir
and completely new artifacts that have no relationship with the
previously deleted.... a better procedure would be:
cd versioned_path
( cd ../unversioned_path ; tar cf - . ) | tar xvf -
svn status | grep "^?" | awk '{ print $2 }' | xargs svn add
# you may need to do something more elaborate with artifacts
# that have spaces in the name
>
> Although this works, it has the disadvantage of splitting what should
> be a single repository commit into two. If mydir is large, there will
> be two large changesets for each commit, even if only a small portion
> of the directory has changed.
>
> Is there a better way of handling this? Thanks,
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
---------------------------------------------------------------------
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-27 17:24:49 CET