Restoring old version to current writable in Visual SourceSafe

依然范特西╮ 提交于 2019-12-08 12:44:06

问题


I am working on an ASP.NET application in VS2010; the repository is still VSS-2005. I am going to abandon the changes made to one of the pages and revert back to the version that existed two checkins ago (which is the current production code). My problem is that I haven't worked with VSS much and I've never done this particular thing before. I can't find any "How to" literature on VSS that tells how to do it, and when I try to do it using the intuitive thing (do a "Get" on the version I want to revert to), it does nothing.

I can View that older version using Notepad, and so I could check out the page and replace the code with the Viewed Notepad version, but this doesn't seem proper somehow.

I've been wondering about the Rollback button, but when I click it, it gives me an ominous message that I am not sure I like: "Rollback cannot be undone; some versions will be lost irretrievably! Continue anyway?"


回答1:


Well, apparently there are no SourceSafe gurus out there, so I'll answer my own question. I bought a book! And it told me how to do it.

Overview:

  1. Check out the current version manually
  2. "Get" the version we want to revert to
  3. Check in the older version as a newer version

Details:

  1. Check out the current version, then use the View History command to show the History dialog and select the version that is desired to be reverted to.

  2. After selecting/highlighting this version, click on the Get button. The Get dialog shows where the specific file version will be placed along with several options. By default the path in the To text box points to the file in our workspace, which is what we want. Don't select the "Make writable" option since the file in question is already under source control. Leave everything as defaulted, and click OK. In the next dialog, choose "Replace". SourceSafe gets the older verison and overwrites the one in the workspace.

  3. Now that you have the older base version, all you have to do is check in the version and obtain a new version that is identical to the old one.

I got this information from the book "Visual Source Safe 2005 - Software Configuration Management in Practice" by Alexandru Serban, published by Packt Publishing Ltd. I bought the book used, but found you can still get it new from the publisher for a lot less than the list price -- $20 less! I don't know who might need a book about an obsolete source control system, but don't pay full price, get it from the publisher direct! Amazon charges the full list price on new copies (astonishing).



来源:https://stackoverflow.com/questions/34602245/restoring-old-version-to-current-writable-in-visual-sourcesafe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!