Note that there are some explanatory texts on larger screens.

plurals
  1. POSVN problem: What is the latest revision that still contained this code snippet?
    primarykey
    data
    text
    <p>It is good practice to remove old code instead of just commenting it out. It is often claimed that the old code parts can always be found again in the old SVN repository revision, if needed.</p> <p>But practically, it's not that easy, right? If the old code is in some <em>unknown</em> old SVN revision then it can be quite hard to find. </p> <p>I'm exactly in that situation right now: There's a function that I don't need anymore, and I should throw it out, since it's in SVN, but I hesitate because I might need it again, and I'm afraid it's going to be hard to find in the repository.</p> <p>Of course, one can always make a commit message, saying "removed function myFunction", but sometimes you can't note every little code removal in the commit message, and it can also be tedious to look through all commit messages to find something again. </p> <p>An automatic tool would be better, something like </p> <pre><code>svn find "void myFunction\(" my-file.cc </code></pre> <p>which would tell me the different results from different revisions. Does something like that exist?</p> <p><strong>EDIT:</strong> Do other version control systems have it? Git maybe? (That'd be a reason to switch, I'd say.)</p> <p><strong>UPDATE:</strong> So there's no real answer except the tiny brittle <code>shell</code> script I found more or less by accident (see my answer below). I think, that's really a shame for SVN. Finding something in earlier revisions should be one of the central functionalities of version control. Does anyone have more info?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload