将 SVN 中的单个文件恢复到特定版本 [英] Reverting single file in SVN to a particular revision

查看:29
本文介绍了将 SVN 中的单个文件恢复到特定版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 SVN 存储库中有一个如下所示的文件,我想将其恢复到以前的版本.在 SVN 中这样做的方法是什么?我只想将此特定文件降级到旧版本,而不是整个存储库.

I have a file as shown below in an SVN repo that I would like to revert to a previous version. What is the way to do this in SVN? I want only downgrade this particular file to an older version, not the whole repo.

谢谢.

$ svn log myfile.py
----------------------
r179 | xx | 2010-05-10

Change 3
----------------------
r175 | xx | 2010-05-08

Change 2
----------------------
r174 | xx | 2010-05-04

Initial

推荐答案

如果您只想在工作副本中使用旧文件:

If you just want the old file in your working copy:

svn up -r 147 myfile.py

如果要回滚,请参阅此如何在 subversion 中返回到我们代码的旧版本?".

If you want to rollback, see this "How to return to an older version of our code in subversion?".

这篇关于将 SVN 中的单个文件恢复到特定版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆