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

RE: Commit a mixed revision working copy as new HEAD?

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-02-24 16:17:56 CET

> From: Dale Worley [mailto:dworley@pingtel.com]
>
> svn checkout http://head-of-repository wc-dir
> svn update -r100 wc-dir/file1
> svn update -r120 wc-dir/file2
> ...etc... to get the WC based on the right revisions of all the files,
> and any additional edits needed
> svn delete http://head-of-repository
> svn copy wc-dir http://head-of-repository

> Of course, it vaporizes any changes committed between the
> checkout and the
> copy, but any method of fixing the problem is going to have
> problems like
> that.

Hmmm, I think you can get around that last restriction as follows: Copy
down the revision from "svn checkout", call it A. Copy down the revision
from "svn copy", call it B. The problem is that any changes committed from
rev A to rev B-1 are lost. (If we were using "svn merge" to make our
changes, its "BASE = HEAD" test would stop us if B-1 > A.) But those
changes are in the history, and we can use "svn merge" to re-install them:

svn checkout http://head-of-repository new-wc-dir
svn merge -r A:B-1 new-wc-dir
svn commit -m 'Reinstall changes from revs A through B-1.' new-wc-dir

Another example of the incredible power of Subversion.

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 24 16:23:14 2005

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.