如何将以前未提交的新更改从以前的 subversion 工作目录合并到新导入的 bazaar 存储库中?

发布于 2024-10-05 06:25:31 字数 967 浏览 7 评论 0原文

我已经升级到 Ubuntu 服务器 10.04 - 但是它删除了我一直用于分布式 vc 需求的 SVK,因为我的许多旧项目仍然包含在各种服务器上的自托管 subversion 存储库中。目前,这在我的各个系统之间运行良好。我决定迁移到 Bazaar,我已经在评估在新项目中的使用情况。

我已经安装了 bzr-svn 插件以允许使用 svn-import - 并在 /var/bzr/repos/ 中成功设置了存储库,其中导入了所有项目进入他们自己的集合(使用自动检测的 trunk2 布局)。 bzr 日志确认所有项目均已成功导入。

不幸的是,我的几个项目在工作文件夹中有一些未提交的更改 - 我想将这些更改重新合并回中央 /var/bzr/repos/projectname 存储库。我希望这些是新导入的存储库之上的新修订。

我应该如何解决这个问题?

这些工作文件夹是 /var/www/projectname/htdocs - 有些位于开发服务器上,有些位于 Windows 笔记本电脑上(已经安装了 bazaar 和 subversion) )

我尝试运行 bzr init 和 bzr merge file://var/bzr/repos/projectname/trunk - 这会产生大量冲突;或者我尝试过: bzr init; bzr 添加和 bzr 合并。

在每种情况下,我都尝试从合并中删除新生成的文件 - 并将 .moved 文件重命名回来,然后提交 - 这会导致修订号从 1 开始,然后向后运行到 -301。另一个不同的结果是,当我尝试“bzr 推送”本地提交的更改备份时,日志历史记录完全丢失。幸运的是,我每次都能够从原始 subversion 源重置并重新导入存储库。

漫长的路线是简单地分支/签出到一个新文件夹,然后比较/重做新的更改,但我想避免重新编码更改或运行 kdiff 目录合并操作。

期望的结果是将新的更改应用于中央 /var/bzr/repos/projectname 分支,同时保留修订号和日志。

I had upgraded to Ubuntu server 10.04 - however it removed SVK which I had been using for distributed-vc needs, as much of my old projects were still wrapped up in self-hosted subversion repositories on various servers. This was working adequately for the time being between my various systems. I decided to migrate onto Bazaar which I was already evaluating using in newer projects.

I have installed the bzr-svn plugin to allow the use of svn-import - and successfully set up repositories in /var/bzr/repos/ where all the projects were imported into their own set (using the auto-detected trunk2 layout). bzr log confirms successful importation of all the projects.

Unfortunately, several of my projects have several uncommitted changes in a working folder - these I would like to remerge back into the central /var/bzr/repos/projectname repository. I would like these to be new revisions on top of the newly imported repositories.

How should I go about this?

These working folders are i.e. /var/www/projectname/htdocs - some are on the development server, and some are on a windows laptop (which already has bazaar and subversion installed)

I have tried running bzr init and bzr merge file://var/bzr/repos/projectname/trunk - this creates a large number of conflicts; alternatively I have tried: bzr init; bzr add, and bzr merge .

In each case I have tried erasing the newly generated files from the merge - and renaming .moved files back, and committing - this has the effect of causing the revision numbers to start from 1, and running backwards to -301. Another different result was the total loss of log history when I tried to "bzr push" locally committed changes back up. Fortunately I have been able to reset and reimport the repository from the original subversion source each time.

The long route would be to simply branch/checkout into a new folder, and diff/redo the new changes over, but I would like to avoid recoding changes or running a kdiff directory merge operation.

The desired result would be to have the new changes applied onto the central /var/bzr/repos/projectname branch while preserving the revision numbers and log.

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

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

发布评论

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

评论(2

一袭水袖舞倾城 2024-10-12 06:25:32

如果您尚未在 bzr 存储库上提交,则可以在 svn 工作文件夹上提交(因此将这些更改放在 SVN 存储库上),并使用 bazaar 重复 svn-import 操作。它只会添加缺少的修订。

If you havent't commited on the bzr repository, you can commit on the svn working folder (therefore placing those changes on the SVN repository), and repeat the svn-import operation with bazaar. It will only add the missing revisions.

小伙你站住 2024-10-12 06:25:31

如果我理解正确的话,我会:
将 .bzr 目录从您想要将其他更改基于(主线/主)的分支复制到包含其他更改的工作目录中。
然后你可以在那里进行 bzr 提交并将其推送到你的主线/主分支。
对每个具有未提交更改的工作树重复此操作。

If I understand correctly, I would:
copy the .bzr dir from the branch you want to base the other changes on (mainline/main) into the workingdir with the other changes.
Then you can do a bzr commit in there and push it to your mainline/main branch.
Repeat for each workingtree with uncommitted changes.

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