Subversion 多个工作副本之间的合并?
我们已经完全丢失了我们的存储库,并且我们有 8 名开发人员进行了未提交的更改。 假定不可能从备份恢复。
如果一个人可以访问所有工作副本(文件副本或远程共享),是否可以将工作副本中的更改合并到一个工作副本? 然后可以将最终的工作副本导入到新的存储库中。
简而言之,是否可以在没有服务器的情况下合并两个不同的工作副本?
编辑:请不要因为没有备份而对我大便; 那部分是我无法控制的。 假设他们每晚都会得到备份。
后续:这就是我们所做的:
- 从最新的开始 所有开发人员的工作副本。
- 将其导入到新的存储库中。
- 从最新的工作副本修订版到最旧的工作副本修订版,仅复制包含更改的文件,然后提交。
- 洗涤-漂洗-重复6次。 (2 名开发人员没有未提交的更改)。
- 导出所有旧的工作副本,将它们拉上拉链并存储起来,以便在需要时安全保存。
- 将我们在发布管理数据库中的修订更新为现在非常年轻的存储库。
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:
- Started with the most up to date
working copy of all the developers. - Imported that into the new repo.
- Working from newest working copy revision to oldest, copied in ONLY the files with changes then committed.
- wash-rinse-repeat 6 times. (2 devs didn't have uncomitted changes).
- exported all the old working copies, zipped them up and stored them for safe keeping if needed.
- Updated our revisions in the release management database to the now very young repo.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
由于您丢失了存储库(对此感到抱歉),您也丢失了整个历史记录。
现在你能做的就是从头开始。
,我的意思是创建工作副本的副本,但其中不包含隐藏的 .svn 文件夹。
Since you lost your repository (sorry for that), you also lost the whole history.
All you can do now is start from scratch.
by 'export', I mean creating a copy of the working copy, but without the hidden .svn folders in it.
嗨,这个问题很棘手。
但这就是我要做的。
当你的后备箱情况稳定时,
你继续分支 2 等
当你完成这项可怕的工作时,
教导开发人员如何尽早并经常签入......
以及如何使用分支...
/Johan
Hi tricky problem this one.
But this is what I would do.
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
您的问题不是您丢失了服务器,而是存储库本身。 除了重新创建一个新的存储库并仔细排序各种工作副本以供导入之外,我看不出您还能做什么。 祝你好运。
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.
最简单的方法是创建您自己的服务器,创建一个测试存储库,在其中添加一个(最稳定的)构建,然后一次合并一个工作副本。 但是,是的,您丢失了所有历史记录,因为您丢失了旧仓库。
然后,您可以从该测试仓库创建主仓库。
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.
我会尝试只选择一个工作副本来为新存储库进行导入,然后使用 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 :)
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
在与最原始工作副本的旧存储库相同的位置创建一个新存储库(这样您就可以在新存储库中捕获更多历史记录)。
如果它不起作用,请从新存储库的签出中放入 .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)