开发者

Fixing a direct rename instead of svn rename

I wanted to rename a file called test.py to main.py. test.py is under subversion version control. I renamed the file directly, but realized later that I should have used svn rename instead. Now svn status shows 开发者_如何学Cthe following:

? main.py
! test.py

Any way to fix this ?


Rename it back, then use svn rename?


If you just renamed it but don't change it use: svn revert and then svn rename. In other case do svn delete main.py and svn add test.py

P.S. The advantage of the svn rename is that file history will be saved. When you do delete and the add the file history will be lost.


Backup the modifications made in main.py, revert test.py, delete main.py (you have a backup), svn rename test.py into main.py, copy/paste the code from your backup to main.py, and commit.


svn revert test.py should solve your problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜