Subversion 创建本地镜像

发布于 2024-10-01 11:43:19 字数 217 浏览 5 评论 0原文

在我们的小组中,我们遇到了一些颠覆的问题(我们仍在学习如何正确使用它)。基本上,最后的修订版都是假的。

我想做的是使下一个版本成为我本地计算机上内容的精确副本 - 我计算机上的文件位于服务器上,不在我本地计算机上的文件不在此版本中修订。

我要做的是重置存储库并从头开始,但我不想丢失最后的修订。

使用 TortiseSVN 和 Google 代码,我怎样才能完成这个任务?

In our small class group, we've had a stuffup with subversion (we are still learning how to use it properly). Basically, the whole last revision is bogus.

What I would like to do is make the next revision an exact copy of what is on my local computer - the files that are on my computer are on the server, and the files that aren't on my local computer aren't in this revision.

What I was going to do is reset the repository and start from scratch, but I don't want to lose our last revisions.

Using TortiseSVN and Google code, how can I accomplish this task?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

天涯沦落人 2024-10-08 11:43:19

我不确定我是否明白你想要什么。您可以在 Tortoise 日志窗口中使用“恢复此修订版的更改”来撤消修订版的更改。这将撤消工作副本中的更改,您必须提交它们。

如果您的工作副本包含您想要保存的更改,您就有更多的选择。

  1. 无论如何提交您的更改,并且仅从有问题的修订版进行更改(如果您当前的更改与有问题的修订版没有太多重叠)
  2. 从当前的更改创建补丁并保存它,然后撤消本地更改,恢复有问题的修订版,提交,应用补丁,提交(这相当于以前的方法,您只需自己做所有事情。
  3. 所有内容都会更新而不会发生冲突
  4. 签出新主干并使用它来恢复有问题的修订,提交,使用本地更改更新主干,并希望如果您可以访问主干, 在服务器上的存储库中,您可以创建备份,然后过滤掉有问题的修订并恢复转储(仅在必须时才执行此操作)

I'm not sure I understand what you want. You can use 'revert changes from this revision' in Tortoise log window do undo changes from revision(s). This will undo the changes in your working copy and you'll have to commit them.

If your working copy contains changes that you'd like to save you have more the one option.

  1. commit your changes anyway, and changes only from your problematic revision (in case your current changes don't overlap too much with the problematic revision)
  2. create patch from your current changes and save it, then undo your local changes, revert problematic revision, commit, apply patch, commit (this is equivalent to previous approach, you just do everything yourself.
  3. checkout new trunk and use it to revert problematic revision, commit, update the trunk with your local changes and hope everything updates without conflicts
  4. if you can access the repo on the server you can create a backup then filter out problematic revision and restore the dump (do this only if you must)
一梦等七年七年为一梦 2024-10-08 11:43:19

首先,除了删除存储库后备存储之外,您不能“重置存储库”,对于 Google 代码,您无论如何也不能这样做。
即使您从存储库中删除所有文件和目录,历史记录和旧版本仍然存在。
其次,只需将存储库中的 HEAD 检出到单独的目录中,然后将每个数据文件替换为本地版本。小心不要触及 .svn 目录。

顺便说一句:这是两种不同的解决方案:一种是删除所有内容并从头开始,而第二种是半手动执行此操作。

First of all, you cannot not "reset the repository" short of deleting the repository backing store, which, in case of Google Code you cannot do anyways.
Even if you delete all the files and directories from the repository, the history and old revisions are there.
Second, just checkout the HEAD from the repository into separate directory, and replace every data file with your local version. Be careful not to touch .svn directories.

BTW: those are two different solutions: one to delete everything and start from scratch, while the second is doing this semi-manually.

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