You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Edward Harvey <eh...@chilsemi.com> on 2007/03/05 22:18:18 UTC

How to un-commit and fall back to a previous version

I am not talking about simply "revert" because a revert is when you
haven't committed your changes.

If somebody commits a change, and later wishes to take it back, what can
they do?

One ugly option is ...  Suppose I want to un-commit version 3, and
everybody should use version 2.  Then I'll update my working copy to
version 2, and commit it again to create version 4.  But I'm just
guessing there's something cleaner and more elegant to do here, right?

Thanks...



--------------------
Edward Harvey
Phone: 978-640-0011 x238
Cell: 603-283-6464

This e-mail is intended for the person(s) to whom it is addressed and
may contain information which is PRIVILEGED or CONFIDENTIAL.  Any
unauthorized use, distribution, copying or disclosure by any person
other than the addressee(s) is strictly prohibited.  If you have
received this e-mail in error, please notify the sender immediately by
return mail and delete the message and any attachments from your system.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: How to un-commit and fall back to a previous version

Posted by Max <sp...@gmx.at>.
hi,

have a look at the subversion book on "undoing changes" here: 
http://svnbook.red-bean.com/en/1.0/ch04s04.html

.. you can undo a changeset by merging in reverse order and then 
commiting again.

in case you've got tortoisesvn, it has a menu entry for that.. just open 
the log of some dir and choose the "revert changes from this revision" item.

hth, max

Edward Harvey wrote:
> I am not talking about simply "revert" because a revert is when you
> haven't committed your changes.
>
> If somebody commits a change, and later wishes to take it back, what can
> they do?
>
> One ugly option is ...  Suppose I want to un-commit version 3, and
> everybody should use version 2.  Then I'll update my working copy to
> version 2, and commit it again to create version 4.  But I'm just
> guessing there's something cleaner and more elegant to do here, right?
>
> Thanks...
>
>
>
> --------------------
> Edward Harvey
> Phone: 978-640-0011 x238
> Cell: 603-283-6464
>
> This e-mail is intended for the person(s) to whom it is addressed and
> may contain information which is PRIVILEGED or CONFIDENTIAL.  Any
> unauthorized use, distribution, copying or disclosure by any person
> other than the addressee(s) is strictly prohibited.  If you have
> received this e-mail in error, please notify the sender immediately by
> return mail and delete the message and any attachments from your system.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to un-commit and fall back to a previous version

Posted by Rahul Bhargava <me...@rahulbhargava.org>.
Edward Harvey wrote:
> I am not talking about simply "revert" because a revert is when you
> haven't committed your changes.
>
> If somebody commits a change, and later wishes to take it back, what can
> they do?
>
> One ugly option is ...  Suppose I want to un-commit version 3, and
> everybody should use version 2.  Then I'll update my working copy to
> version 2, and commit it again to create version 4.  But I'm just
> guessing there's something cleaner and more elegant to do here, right?
>
>   

That's what you will have to do. Unlike CVS, Subversion does not have 
any admin command to get
rid of  committed versions.

> Thanks...
>
>
>
> --------------------
> Edward Harvey
> Phone: 978-640-0011 x238
> Cell: 603-283-6464
>   


-- 
Rahul Bhargava
http://www.rahulbhargava.org
Phone: (925) 265-8801(W)|895-2201(M)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to un-commit and fall back to a previous version

Posted by Mark Phippard <ma...@gmail.com>.
On 3/6/07, James Oltmans <jo...@bolosystems.com> wrote:
>
>
> -----Original Message-----
> From: Edward Harvey [mailto:eharvey@chilsemi.com]
> Sent: Monday, March 05, 2007 3:18 PM
> To: users@subversion.tigris.org
> Subject: How to un-commit and fall back to a previous version
>
> I am not talking about simply "revert" because a revert is when you
> haven't committed your changes.
>
> If somebody commits a change, and later wishes to take it back, what can
> they do?
>
> One ugly option is ...  Suppose I want to un-commit version 3, and
> everybody should use version 2.  Then I'll update my working copy to
> version 2, and commit it again to create version 4.  But I'm just
> guessing there's something cleaner and more elegant to do here, right?
>
> Thanks...




If you check out version 2 you won't be able to commit it as version 4,
> because a clean checkout has no modifications and therefore no reason to
> be checked in. What you need to do is undo just the changes between
> version 2 and version 3 and then commit that as version 4:
> svn merge -r 3:2 <url> <working copy path>
>
> That will undo the changes between version 3 and 2, all you need to do
> after that is commit it.


I have a more detailed explanation of the same answer in a blog post:

http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

RE: How to un-commit and fall back to a previous version

Posted by James Oltmans <jo...@bolosystems.com>.
-----Original Message-----
From: Edward Harvey [mailto:eharvey@chilsemi.com] 
Sent: Monday, March 05, 2007 3:18 PM
To: users@subversion.tigris.org
Subject: How to un-commit and fall back to a previous version

I am not talking about simply "revert" because a revert is when you
haven't committed your changes.

If somebody commits a change, and later wishes to take it back, what can
they do?

One ugly option is ...  Suppose I want to un-commit version 3, and
everybody should use version 2.  Then I'll update my working copy to
version 2, and commit it again to create version 4.  But I'm just
guessing there's something cleaner and more elegant to do here, right?

Thanks...



--------------------
Edward Harvey
Phone: 978-640-0011 x238
Cell: 603-283-6464

If you check out version 2 you won't be able to commit it as version 4,
because a clean checkout has no modifications and therefore no reason to
be checked in. What you need to do is undo just the changes between
version 2 and version 3 and then commit that as version 4:
svn merge -r 3:2 <url> <working copy path>

That will undo the changes between version 3 and 2, all you need to do
after that is commit it.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org