前段时间丢失了 svn 目录..我如何找出哪个版本有它?
我前段时间丢失了一个 svn 目录,但不知道哪个版本有它?我查看了日志,但我猜这是没有评论的时间之一;)
I lost an svn directory some time ago, but don't know which revision has it? I looked at the log, but I'm guessing it is one of the times there is no comment ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不确定您的平台是什么,但使用 TortoiseSVN 您可以按作者、评论和路径过滤修订。
右键单击您的工作文件夹,选择
TortoiseSVN/Show Log
,然后在右上角的搜索框中输入文件夹的名称。它将限制列表中的修订版本为匹配的修订版本。该列表中的顶部修订版可能是包含对您的文件夹(已删除的文件夹)的引用的最后一个修订版。您可能需要点击底部的
显示全部
按钮,因为默认情况下它仅显示最后 100 个修订。Not sure what your platform is, but with TortoiseSVN you can filter revisions by author, comment, and path.
Right-click your working folder, select
TortoiseSVN/Show Log
, then type the name of your folder in the search box at the top right. It will limit the revisions in the list to ones that match. The top revision in that list will likely be the last that contained a reference to your folder (where it was deleted).You might need to click the
Show All
button at the bottom, as it only shows the last 100 revisions by default.根据您的 svn 服务器,您可以尝试找出服务器的最后一个连接。然后您应该查看当时哪个版本是最新的。
Depending on your svn server you could try to figure out which was the last conntection to the server. You should then look which revision was current at that time.
我想知道您是否可以编写一个小脚本来使用命令行 svn 来尝试以下内容:
这将是如果彻底了解 SVN 的人无法想出快速进行二分搜索和比较的方法,请尝试一下。
I wonder if you could write a small script to use the command line svn to try something along the lines of:
This would be something to try if someone who knows SVN inside-and-out doesn't come up with a way to quickly do a binary search and compare.
您可以打开详细开关来检查整个日志,并 grep 您要查找的目录以及删除标志和 grep 修订号:
第二个选项是通过“猜测”来检查文件 itelf 上的日志(带或不带详细开关)修订号,例如,
以上两种方法都不是好方法,但它们可以解决问题。
You can check entire log with verbose switch on and grep the directory you are looking for together with delete flag and grep revision numbers as well:
Second option is to check the log (with or without verbose switch) on the file itelf by "guessing" revision numbers, for example
Neither of above are nice approaches, but they will do the trick.