Subversion 多个工作副本之间的合并?

发布于 2024-07-12 08:03:13 字数 538 浏览 8 评论 0原文

我们已经完全丢失了我们的存储库,并且我们有 8 名开发人员进行了未提交的更改。 假定不可能从备份恢复。

如果一个人可以访问所有工作副本(文件副本或远程共享),是否可以将工作副本中的更改合并到一个工作副本? 然后可以将最终的工作副本导入到新的存储库中。

简而言之,是否可以在没有服务器的情况下合并两个不同的工作副本?

编辑:请不要因为没有备份而对我大便; 那部分是我无法控制的。 假设他们每晚都会得到备份。

后续:这就是我们所做的:

  1. 从最新的开始 所有开发人员的工作副本。
  2. 将其导入到新的存储库中。
  3. 从最新的工作副本修订版到最旧的工作副本修订版,仅复制包含更改的文件,然后提交。
  4. 洗涤-漂洗-重复6次。 (2 名开发人员没有未提交的更改)。
  5. 导出所有旧的工作副本,将它们拉上拉链并存储起来,以便在需要时安全保存。
  6. 将我们在发布管理数据库中的修订更新为现在非常年轻的存储库。

We've completely lost our repository and we have 8 developers with uncomitted changes. Restoring from backup is assumed to be not possible.

If one person could have access to all the working copies (either file copy or remote share) is it possible to merge changes in our working copies to one working copy? The final working copy could then be imported into a new repo.

In short, can you merge two different working copies without the server?

edit: please don't poo poo me for not having backups; that part is beyond my control. It was assumed they were getting backed up nightly.

Followup: this is what we did:

  1. Started with the most up to date
    working copy of all the developers.
  2. Imported that into the new repo.
  3. Working from newest working copy revision to oldest, copied in ONLY the files with changes then committed.
  4. wash-rinse-repeat 6 times. (2 devs didn't have uncomitted changes).
  5. exported all the old working copies, zipped them up and stored them for safe keeping if needed.
  6. Updated our revisions in the release management database to the now very young repo.

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

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

发布评论

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

评论(7

昇り龍 2024-07-19 08:03:13

由于您丢失了存储库(对此感到抱歉),您也丢失了整个历史记录。

现在你能做的就是从头开始。

  1. 创建新的存储库
  2. 创建文件夹结构
  3. 将第一个用户的工作副本导出到新文件夹
  4. 将导出的文件夹导入到存储库
  5. 所有其他用户现在签出新的工作副本
  6. 所有其他用户现在通过“导出”其原始工作副本 通过“导出”创建新工作副本

,我的意思是创建工作副本的副本,但其中不包含隐藏的 .svn 文件夹。

Since you lost your repository (sorry for that), you also lost the whole history.

All you can do now is start from scratch.

  1. create a new repository
  2. create the folder structure
  3. export the working copy of the first user to a new folder
  4. import the exported folder into the repository
  5. all other users now check out a new working copy
  6. all other users now 'export' their original working copy over the new working copy

by 'export', I mean creating a copy of the working copy, but without the hidden .svn folders in it.

暮光沉寂 2024-07-19 08:03:13

嗨,这个问题很棘手。
但这就是我要做的。

  1. 创建一个新的存储库。
  2. 创建 8 个分支和 1 个主干
  3. 导入开发人员在分支上的工作。
    • 分支 1 上的开发人员 1
    • 分支 2 上的开发人员 2
    • 等等等等
  4. 然后开始从分支 1 合并到主干。
    当你的后备箱情况稳定时,
    你继续分支 2 等

当你完成这项可怕的工作时,
教导开发人员如何尽早并经常签入......
以及如何使用分支...

/Johan

Hi tricky problem this one.
But this is what I would do.

  1. Create a new repository.
  2. Create 8 branches and 1 trunk
  3. Import the developers work on the branches.
    • Developer 1 on branch 1
    • Developer 2 on branch 2
    • etc etc
  4. Then start to merge from branch 1 to trunk.
    And when you have a stable condition in the trunk,
    you continue with branch 2 etc etc

And when you are done with this horrible work,
teach the developers about checkin early and often...
And how to use branches...

/Johan

£烟消云散 2024-07-19 08:03:13

您的问题不是您丢失了服务器,而是存储库本身。 除了重新创建一个新的存储库并仔细排序各种工作副本以供导入之外,我看不出您还能做什么。 祝你好运。

PS:没有备份对你不好...

PPS:这就是问题DVCS 通过在每个开发人员的沙箱中为大多数人提供完整的存储库副本来自然地解决问题。

Your problem is not that you have lost the server but the repo itself. Apart from re-creating a new repo and carefully sort the various working copies for import, I do not see what you could do. Good luck.

PS: bad on you to not having backups...

PPS: this is the sort of problem DVCS solve naturally by having for most of them a complete copy of the repo in every developer's sandbox.

离线来电— 2024-07-19 08:03:13

最简单的方法是创建您自己的服务器,创建一个测试存储库,在其中添加一个(最稳定的)构建,然后一次合并一个工作副本。 但是,是的,您丢失了所有历史记录,因为您丢失了旧仓库。

然后,您可以从该测试仓库创建主仓库。

The easiest way would be to create your own server, create a test repo, add one (most stable) build in it, and merge the working copies one at a time. But yes you lost all history because you lost your old repo.

You can then create you main repo from that test one.

请爱~陌生人 2024-07-19 08:03:13

我会尝试只选择一个工作副本来为新存储库进行导入,然后使用 svn 开关(可能使用重新定位)将剩余的 7 个工作副本重新指向该新存储库,以使他们相信它是相同的存储库但已重新定位。 只需尝试为初始导入选择一个没有(或尽可能少)丢失存储库结构更改的工作副本:例如,仅进行文件编辑。

当然,请对您的工作副本进行大量备份,以防上述方法不起作用:)

I would try just picking one working copy off which to do an import for the new repo, and then repoint the remaining 7 working copies at that new repo using svn switch, possibly with relocate, to make them believe it's the same repo but relocated. Just try to pick a working copy for the initial import that has no (or as few as possible) structural changes from the lost repository: e.g. just file edits.

Of course, make tons of backups of your working copies in case the above doesn't work :)

戏剧牡丹亭 2024-07-19 08:03:13

Subversion 将文件的原始版本保留在本地工作副本中。 创建一个新存储库,复制最旧的工作副本,恢复工作副本副本上的更改,然后将该工作副本导入到新存储库。

svn导入: http://svnbook.red-bean.com/en/1.0 /re12.html

导入后,您可以使用 svn switch --relocate 将其他工作副本重新指向您的新存储库,并提交更改。

svn switch --relocate: http://svnbook.red-bean.com/ en/1.1/ch04s05.html

Subversion keeps the original version of a file in the local working copy. Create a new repository, make a copy of the oldest working copy, revert changes on the COPY of the working copy, then import that working copy to your new repository.

svn import: http://svnbook.red-bean.com/en/1.0/re12.html

Once you've imported, you can use svn switch --relocate to repoint the other working copies to your new repository, and commit the changes.

svn switch --relocate: http://svnbook.red-bean.com/en/1.1/ch04s05.html

嗳卜坏 2024-07-19 08:03:13

在与最原始工作副本的旧存储库相同的位置创建一个新存储库(这样您就可以在新存储库中捕获更多历史记录)。

如果它不起作用,请从新存储库的签出中放入 .svn-directories。
(例如签出,并删除除 .svn-directories 之外的所有内容)

Create a new repository in the same location as the old one from the most original working copy (That way you catch more history in the new repository).

If and where it doesn't work, put in .svn-directories from a checkout of the new repository.
(For example checkout, and delete everything but the .svn-directories)

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