Search code examples
svnversion-controltortoisesvn

How can I find out a file's current HEAD revision in Tortoise SVN?


I use Tortoise SVN for file version control. I have a file with multiple commits across time. The most recent committed version is the HEAD revision, naturally. I wished to move the file's HEAD revision to a previous revision. So, I found the file in Windows File Explorer, right-clicked it to open the file context menu, and performed the following operations.

  1. Select Tortoise SVN
  2. Select Show Log
  3. Find the previous revision
  4. Right-click the revision
  5. Select Revert to this Revision

This worked, given the message generated by Tortoise SVN and the new file in File Explorer. But when I return to the file log I see nothing changed in the Log's UI that indicates which file is now the HEAD. I assumed it would maybe be marked with a * or in bold or have "HEAD" written near it.

I note that having read this post, I maybe confused as to the difference between "reverting to a previous revision" and "changing a file's HEAD".

So, if a file has 100 commits across time and I am regularly changing the HEAD then how can I know at any time which revision one is the HEAD? I cannot find an answer on StackOverFlow or the Tortoise SVN documentation.

Thank you.


Solution

    • You have misunderstanding and misinterpretation of some basic SVN concepts and entities due to pure TSVN-usage without understanding events behind the scene of GUI
    • When you apply "Revert to this Revision" action to file, you get modified Working Copy with changed content of file, which you have to commit into repository in order to save produced changes and you'll get new revision in repo, which become new HEAD (by definition of repository HEAD), i.e. you don't "move the file's HEAD revision to a previous revision" technically, you create new version of file in the new revision in repository, with file-content identical to some older revision of file