Question

Conventional wisdom says to delete code once you don't need it -- as opposed to leaving it in the codebase as a comment -- because you can always find it later in the repository.

Let's say I need a line of code from the past which I remember to contain a very memorable substring ("XYZ", for discussion's sake).

What are my options for finding the previously deleted code using the Visual Studio 2010 Rational Team Concert (3.x) client? Can I search only the revisions of a single file (I might not know what file it was in)? Can I search quickly/easily across many files (w/o pulling those files out of the repository)?

Was it helpful?

Solution

I am not sure there is an easy way to get back the exact file with that missing string.

You can select show the history on a component of a Stream, in order to "Show the History files" for a given change set.

From there, you can do some "compare with Local File".

However, the Visual Studio integration might be less complete than the eclipse one, as this thread shows (where the "Show History" shows only the history of Deliver's).

Even though the following article uses the Eclipse GUI, have also a look at "Practicing source control archaeology with Rational Team Concert", which has other ideas for you to try.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top