[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: Ryan Schmidt <subversion-2004_at_ryandesign.com>
Date: 2005-02-24 15:15:15 CET

On 24.02.2005, at 07:57, Zachary Pincus wrote:

> So again, is there any way to convince svn to commit a mixed revision
> working copy as the new HEAD? Or are we really stuck with either (a)
> using svn cat, which ignores history, or (b) using svn merge and svn
> copy, tools which are too general for the specific problems at hand
> and thus have nasty and inconsistent syntax for wholesale file
> reversion and undeletion. (Note that the merge/copy syntax is great
> for the more general tasks for which these tools were designed!)

I really don't understand the problem. "svn merge" is the tool you want
to use for this.

If you deleted a file and committed that as revision 10, and then later
realized that you shouldn't have deleted it, what you need to do is get
a current working copy of head and do a reverse merge, that is, merge
the change from revision 10 to revision 9. This should restore the file
in your working copy. (Shouldn't it? I haven't done this yet but that's
what I understand should happen.) Then you test your working copy and
check it in as a new revision.

You wrote about restoring individual files in your previous messages.
Subversion does not track individual files. You need to speak of
"restoring the project to the state it was in in revision X". Perhaps
in the very simplest case you make exactly one change in exactly one
file and commit that, but often you make changes to many files, and
those changes depend on each other, and they're all committed at once.
To undo this operation, you don't want to talk about restoring these 5
files to their previous revisions -- in particular because other
unrelated changes to these 5 files may have taken place since then
which should not be removed. Rather, you want to back out the bad
changes made to these 5 files. That's what reverse-merging is about.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 24 15:17:30 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.