前段时间丢失了 svn 目录..我如何找出哪个版本有它?

发布于 2024-08-07 14:27:57 字数 59 浏览 4 评论 0原文

我前段时间丢失了一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

↘人皮目录ツ 2024-08-14 14:27:57

不确定您的平台是什么,但使用 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.

预谋 2024-08-14 14:27:57

根据您的 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.

最后的乘客 2024-08-14 14:27:57

我想知道您是否可以编写一个小脚本来使用命令行 svn 来尝试以下内容:

  1. 对于范围内的每个修订版 x
  2. 切换到修订版 x
  3. 将目录与工作副本进行比较
  4. 如果它们匹配,则停止

这将是如果彻底了解 SVN 的人无法想出快速进行二分搜索和比较的方法,请尝试一下。

I wonder if you could write a small script to use the command line svn to try something along the lines of:

  1. For each revision x in a range
  2. Switch to revision x
  3. Compare directory against your working copy
  4. If they match, stop

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.

走过海棠暮 2024-08-14 14:27:57

您可以打开详细开关来检查整个日志,并 grep 您要查找的目录以及删除标志和 grep 修订号:

svn log -v | grep -i -e "   D /path/to/folder" -e "^r[0-9]" | more

第二个选项是通过“猜测”来检查文件 itelf 上的日志(带或不带详细开关)修订号,例如,

svn log svn://repository/deleted/directory -r1337 -v --limit 1

以上两种方法都不是好方法,但它们可以解决问题。

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:

svn log -v | grep -i -e "   D /path/to/folder" -e "^r[0-9]" | more

Second option is to check the log (with or without verbose switch) on the file itelf by "guessing" revision numbers, for example

svn log svn://repository/deleted/directory -r1337 -v --limit 1

Neither of above are nice approaches, but they will do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文