开发者

Finding previously deleted code in RTC later?

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)?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜