subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schöning <>
Subject Re: a svn revert question
Date Fri, 08 Mar 2013 16:05:11 GMT
Guten Tag frame,
am Freitag, 8. März 2013 um 16:06 schrieben Sie:

> Let's say my project head is r130. We found a bug, started in r111.
> I want to do this: I want to fix r111, check in as r131. I also want
> to fix r130, checking as r132, the new head. How to do that?

The easiest way would not to do what you describe, but create a new
branch or tag by copying r111 to a different directory than your trunk
and fix your bug there and use that tag or branch for whatever reason
you have to fix the bug in your old revision.

Everything else is a bit more complicated as you can't commit on top
on an old revision. What you can to is revert your current work on a
file to an old revision, commit this as your new head and afterwards
fix the bug in the new head with the old source. Afterwards you need
to revert everything back to your initial head before you reverted to
the source of r111, commit and fix the bug again. You don't
necessarily need the commit between reverting the source and fixing
the bug, but with it it would be more clear what was needed to fix the
bug and is not part of the revert to fix the bug.

What you can't do is checking out r111 and commit directly on top of
this revision as you can only commit on top of head and in your case
r111 and r130 would surely differ in the same file you want to change.

This may help to understand the differences:

> Please don't criticize me on why not just fix r130 to become r131,
> the new head. Please just help on how to achieve what I want.

Nevertheless it would be good to know why you need to fix your old
revision, as one could recommend best practices, like using tags and
branches for those kinds of things.

> I think revert is somehow related, so I put it on the subject,
> since I don't know how to summarize my question.

revert is the wrong command, what you have to look at is update and
merge, but as I mostly use TortoiseSVN, I can't give you an example.

Mit freundlichen Grüßen,

Thorsten Schöning

Thorsten Schöning
AM-SoFT IT-Systeme

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

View raw message