如何修复这个因“过时"而失败的 SVN 提交? [英] How can I fix this SVN commit which fails as "out of date"?

查看:44
本文介绍了如何修复这个因“过时"而失败的 SVN 提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的存储库中,我有两个修订版.src 代码在修订版 2 上,但我的文件搞砸了,所以我将其恢复为修订版 1.

经过几个小时的调试后,该 javafile 可以工作,但我无法提交.SVN 说 javafile 已过期.这大概是因为我在编辑javafile.java rev1吧?

我该如何解决这个问题?我知道我可以将修改后的 javafile rev1 代码复制/粘贴到其 rev2 副本中,然后提交,但还有其他方法吗?我是否错误地使用了 SVN?

解决方案

更新工作副本应该可以修复它.

从命令行:

X:\WorkingCopy>svn up

或在 TortoiseSVN 中右键单击并选择 SVN Update...

更新时可能会遇到冲突,会在你的代码中用

标记<预><代码>>>>>>...-----...<<<<<

您需要手动解决这些问题.完成后,不要忘记将文件标记为已解决.

X:\WorkingCopy>svn resolve \path\to\file

或右键单击并在 TortoiseSVN 中选择 TortoiseSVN -> Mark as Resolved...

In my repository, I have two revisions. The src code is on revision 2, but I had a file that messed up, so I reverted it to revision 1.

After a few hours of debugging, that javafile works, but I can't commit it. SVN says that the javafile is out of date. This is probably because I'm editing javafile.java rev1, right?

How do I resolve this? I know I could copy/paste my modified javafile rev1 code into its rev2 counterpart, and then commit, but is there another way? Am I using SVN incorrectly?

解决方案

Updating the working copy should fix it.

From the command line:

X:\WorkingCopy>svn up

or right-click and choose SVN Update... in TortoiseSVN

When you update, you may come across conflicts, which will be marked in your code with

>>>>>
...
-----
...
<<<<<

You'll need to manually resolve these. When you're done, don't forget to mark the file as resolved.

X:\WorkingCopy>svn resolve \path\to\file

or right-click and choose TortoiseSVN -> Mark as Resolved... in TortoiseSVN

这篇关于如何修复这个因“过时"而失败的 SVN 提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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