You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Jorge Manuel Domingues Peneirol (Via Directa)" <jo...@viadirecta.pt> on 2008/08/29 17:58:08 UTC

revert and undo revert

Hi.

 

I have to give to a client a first version of my software and for that I
need to revert some revisions. This I already did with the "rever to
this revison" option in SVN.

 

But now I need to put this revisions back in SVN. Is there any way I can
do this in SVN ... without doing another commit in the developers pc ?

 

Best regards, 

George Peneirol



 


Re: revert and undo revert

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Friday 29 August 2008, Jorge Manuel Domingues Peneirol (Via Directa) wrote:
> I have to give to a client a first version of my software and for that I
> need to revert some revisions. This I already did with the "rever to
> this revison" option in SVN.
>
>
> But now I need to put this revisions back in SVN. Is there any way I can
> do this in SVN ... without doing another commit in the developers pc ?

Firstly, if you want to release an older version of a project to e.g. a 
customer, you should rather create a tag from that revision. If you can't pin 
it on a certain revision but have several, nonconsecutive changes in the 
trunk you don't want included, create a branch first and reverse-merge all 
changes you don't want.

Other than that, the other two answers also pointed out some important points, 
in particular that it's not clear what you actually did and what you want to 
accomplish now.

cheers

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************


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


Re: revert and undo revert

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
You'll get better help if you more clearly explain what you are trying  
to accomplish and why.  Guessing what someone is trying to ask is  
occasionally amusing.  Generally, though, it's too much bother.


On Aug 29, 2008, at 19:58, Jorge Manuel Domingues Peneirol (Via  
Directa) wrote:

> Hi.
>
> I have to give to a client a first version of my software and for  
> that I need to revert some revisions. This I already did with the  
> “rever to this revison” option in SVN.

Mentioning "revert to this revision" makes it sound like you're using  
TortoiseSVN, not the command line client.  If so, consider asking at users@tortoisesvn.tigris.org 
.

I'm going to assume you're using the command line client from here on  
out.

I'm also going to assume you mean to undo changes previously checked  
in to the repository, and not that you're trying to undo the results  
of an "svn revert" command.  "svn revert" throws away *uncommitted*  
work you've done locally since your last commit.  The "svn revert"  
command is -- by definition -- not undoable.

So, you might mean that you used:

$ svn update -r100

To update your local copy to revision 100 (where 100 is the revision  
you reverted to.) In this way, you can see what things looked like in  
revision 100 of the repository, but this isn't what you want if you  
want to make changes to remove all the changes you've made since r100.

You might also have used merge, and indeed, that's the only thing that  
makes sense in this case:

$ svn merge -rHEAD:100 . .

Which means: make the changes locally which are necessary to get from  
the current (HEAD) state of the repository back to how it was in  
revision 100 within the current working copy.

The changes made by merge are purely local. In your working copy. On  
your machine. If you want them to be visible for others, you'll have  
to commit them.

> But now I need to put this revisions back in SVN.

Yes. merge. then commit.

> Is there any way I can do this in SVN … without doing another commit  
> in the developers pc ?

I'm sorry, you've lost me here completely.  Do the merge and commit  
from your PC.  Or are you confusing commit and update?

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


Re: revert and undo revert

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 29, 2008, at 12:58 PM, Jorge Manuel Domingues Peneirol (Via  
Directa) wrote:

> I have to give to a client a first version of my software and for  
> that I need to revert some revisions. This I already did with the  
> “rever to this revison” option in SVN.
>
> But now I need to put this revisions back in SVN. Is there any way  
> I can do this in SVN … without doing another commit in the  
> developers pc ?

Undoing revisions is accomplished with a reverse merge, which is  
explained in the Book:

http://svnbook.red-bean.com/nightly/en/ 
svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo

However, this may not be the best solution to your problem. What are  
these revision you don't want to show the client? Are they new  
incomplete features, which you would like to keep in the repository  
and continue working on? It sounds like what you really should do  
instead is to create a tag from a previous revision of your  
repository, and give the client an export or working copy of that  
tag, instead of the trunk.

For example, let us assume your repository is at revision 100 and  
there are recent changes in trunk that you do not want to give your  
client. You decide you want to give your client the trunk as it  
appeared in revision 90. It would be best, then, to create a tag of  
trunk at revision 90. If $REPO is your repository URL, then you could:

svn cp -r 90 $REPO/trunk $REPO/tags/client-release-1

Or you can name your tag anything else that makes sense to you. Then  
you can check out or export client-release-1 from the tags directory  
and give that to the client. And you can always refer back to this  
tag to see what exactly you gave to the client.


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