0

I'm Working on a Windows project and I have an issue:

My head revision is at 670, but the code is broken for some reason.

So I did a new svn checkout (a copy) of my old revision (668), which worked, but I forgot to do a revert so the 668 revision became the 671th, and I have modified my code in this revision.

So now I got a folder/repo with the 668 revision which is different from the initial 668 revision and I want to commit it to the head, but I don't know how to properly do that, can someone help me?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Hapax Jean
  • 13
  • 4
  • Possible duplicate of [How can you "Revert to this Revision" with a specific revision number from the Command Line?](http://stackoverflow.com/questions/16610562/how-can-you-revert-to-this-revision-with-a-specific-revision-number-from-the-c) – alroc Sep 02 '16 at 16:56

1 Answers1

0

If you want that the HEAD revision of your repository becomes identical to the revision 668, you should perform the following operations:

  1. Checkout the HEAD revision (or just perform the svn commands 'revert' then 'update' on your working copy)
  2. Run the command svn merge -r HEAD:668: your working copy becomes identical to revision 668
  3. Commit

Laurent H.
  • 6,316
  • 1
  • 18
  • 40
  • The fact is that i want to do this on a 668 revision that has been modified and not commited. Is this possible ? – Hapax Jean Sep 05 '16 at 07:07
  • You can commit only if your working copy is updated with the HEAD revision of repository, which is logical because svn stores only the differences from a revision to the next one. A possibility would be to create a patch file (you can do it with TortoiseSvn) from your working copy to store the modifications you want to apply compared with revision 668. Then you can do what I suggest in my answer, then apply the patch and commit. – Laurent H. Sep 05 '16 at 18:56