开发者

Want to revert back 3 revisions, how?

Let's say I have a u开发者_Python百科ser's object, I deleted a property and all things in the web project that used this property (admin pages that updated the property, data layer etc etc).

Now I was told that we need that property, looking at Subversions log it seems the correct code is 3 revisions back.

How can I go back, then somehow get any updates that may have occurred by other devleopers also?


Get the revision number from log for the correct code. Right-click the file you want to rollback. Select Tortoise SVN -> Update to Revision. In dialog fill number of revision you what to update file to, click OK and you are done!

EDIT:- to perform action on command line use svn merge. for more information type following in command line:

svn --help merge ENTER

Here is link to SVN book describing the operation.

You can also have a look at this question, which is also about same issue.


You'll need to know which files you want, and update all to "HEAD" and then those specific files to "HEAD - 3" revision number. Then you'll need to commit those specific files back.

There maybe a better option that I'm not aware of.


If you committed the whole change, and only that change in one go, you can back out that change to your working copy. You could then commit that if it works.

Log Messages > right-click the offending revision > Revert changes from this revision

I've only tried it for a small number of files, I imagine there could be serious conflict headaches.


Theoretically, you can reverse merge. I tried once and subversion absolutely failed to do this--corrupted my working copy or just flat out crashed every single time.

Practically, you might have to update to the old version, save off copies of the files affected, update to latest, manually reverse merge the changes.

It would be a lot more practical (though unsophisticated) if you can just update 3 revs back, recommit it, and have anyone who made changes since recommit them.


Use the log dialog.

Select the revision you want to revert. Right-click on that revision, choose "revert changes from this revision".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜