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

Re: Troubles updating repository to a stable state

From: Paul Koning <pkoning_at_equallogic.com>
Date: 2006-01-26 19:23:58 CET

I'm not sure if I follow what you were asking, but let me describe
what I think the problem is and how I would deal with it.

1. You have a good repository.
2. User A and B check out.
3. User A does some work (which is good stuff).
4. User B does some work, mistakenly on the wrong branch, commits it.
5. User A does "svn update" (merging in B's changes) and commits the result.
6. Oops, you now have broken code.

What you want is the work of A but not that of B -- in other words,
undo step 4.

Look at the log. Suppose the commit of B was rev 123.

At the top of a working directory for your repository (trunk or the
appropriate branch), do
         svn merge -r 123:122 http://path/to/repo/trunk .
That will apply the reverse of the changes made by rev 123 -- in
effect, an "undo" of B's commit. It's possible you will get conflicts
(if so, A is likely to know, since he would have seen the analogous
conflicts during the update at step 5). If so, resolve them, then
commit the result.

You should now have what you want. This is an example of the general
"how to undo something" procedure, which Subversion makes pretty easy
this way.

     paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 26 19:36:33 2006

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.