1

I need to checkout a previous version from my SVN and then make some changes to it, commit it and then prepare the build from this new revision from Jenkins.

How can this be done?

I know I can checkout a previous revision but when I will commit the changes to this revision, the new commit will still have all the other previous changes.

I am using TortoiseSVN.

Example of what I want to achieve: Say the current version is 111. and I want to revert to revision 99 and then be able to commit to this without all the changes from 100 till 111. Then build this new revision from Jenkins.

This SO question was also looking for something similar, is it still not possible to do something like this?

Community
  • 1
  • 1
rd22
  • 1,032
  • 1
  • 18
  • 34

1 Answers1

3

Every commit leads to a new revision. Your old commits will stay in log.

In your case you have to use "revert to this revision" (Tortoise context menu). Then make your changes and commit. This will create a commit which makes an "anti-commit" to the changes from 100 till 111 plus your new changes.

But I would recommend you to do this in two commits. First "revert to this revision" -> check in and a second commit with your new changes.

Maybe this helps to: What is Reverse Merge ( Revert Merge ) in SVN, a simple explanation and the step by step processes from start to finish

Community
  • 1
  • 1
Micha
  • 5,117
  • 8
  • 34
  • 47
  • Thanks, so to simplify all I did was reverted the changes back to what I needed and checked in those files again. – rd22 Oct 28 '15 at 11:06
  • @Micha: I have a question: I read "revert to revision" quite often. However, I have never seen it anywhere, not in SVN, and not in TSVN. I know "revert", and I know "merge", in which you can "reverse merge". Also, many people say that a "reverse merge" is a "commit", which, in my opinion, it is not, as one would still have to commit a reverse merge's changes. Where do these usages come from? – Ingo Schalk-Schupp May 13 '16 at 08:11
  • 1
    @Douba: You can find "revert to revision" in Tortoise SVN when you open the log (via "SVN Show log") and right click on of the revisions. For more complex questions I would recommend you to open a new question, because it would be better manageable :-) – Micha May 17 '16 at 06:51
  • @Micha: Thank you. I could find it where you said now. It seemed too subjective on my side for me to ask a new question, but of course you are right. – Ingo Schalk-Schupp May 17 '16 at 11:43
  • @Douba: Nice to hear that you find it. – Micha May 18 '16 at 05:30