编辑后如何分支CVS?

发布于 2024-11-28 13:49:50 字数 304 浏览 4 评论 0原文

在阅读了文档和文档后,我正在努力掌握 CVS 中的分支技巧。在线教程。让我举一个例子来说明我的开发流程有时是如何工作的:

我将对某些内容进行一些更改(假设修复一些错误,这些错误毫不奇怪地会变成更大的项目/活动)。现在,我不想将这些更改提交到主分支,因为如果有人在网络服务器上进行更新,它们就会被发布。

我查找了分支,但如果我尝试对这些文件进行分支,那么它会说我不能,因为文件已被修改。我是否以错误的方式处理这个问题?到目前为止,我只是将这些更改保留在本地沙箱中,但是对于多个重叠的项目/错误修复(其中一些修复速度很快,需要在上述更改之前发布),这可能会变得棘手。

I'm struggling to get a hang of branching in CVS after reading the documentation & tutorials online. Let me give you an example of how my dev flow sometimes works:

I'll make a few changes on something (let's say fix some bug that not surprisingly turns into a larger project/activity). Now, I don't want to commit these changes to the main branch because they will be released if someone does an Update on the webserver.

I looked up branching, but if I try and branch these files then it says I can't because the files have been modified. Am I going about this the wrong way? Up until now I've just left these changes stewing in my local sandbox, but this can get tricky with multiple overlapping projects/bug fixes (some of which are quick and need to be released before the changes mentioned above).

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

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

发布评论

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

评论(5

给我一枪 2024-12-05 13:49:50

通过取消选中“分支创建”对话框中的“检查文件是否未修改”,可以轻松完成此操作。

创建分支后,通过执行更新特殊并选择新分支来切换到该分支(您可能需要单击更新列表...才能使新分支出现)。本地修改的文件将不受此更新的影响(前提是您不勾选清理副本)。然后只需照常进行提交即可使您的更改显示在新分支中。

This can be readily accomplished by unticking Check that files are unmodified on the Branch Creation dialogue box.

Once the branch is created, switch to the branch by doing an Update Special and choosing the new branch (you may need to click Update list... for the new branch to appear). The locally-modified files will be unaffected by this update (provided that you do not tick Clean copy). Then simply do a Commit as normal to make your changes appear in the new branch.

野却迷人 2024-12-05 13:49:50

实际上不可能完成这项任务。终于实现了 Git,我获得了翅膀,不再需要在 CVS 的泥沼中艰难前行。案例已结...不要尝试使用 CVS 进行分支(尤其是在更改之后)。

It was effectively impossible to make this task work. Having finally implemented Git, I have been given wings and no longer do I have to trudge through the mud of CVS. Case closed ... do not attempt branching with CVS (especially after changes).

流殇 2024-12-05 13:49:50

大约有十年没有使用简历了;)

我认为你必须首先更新你的工作副本。这会将主分支的所有更改合并到您的工作副本中。如果这没有帮助,只需重新签出到不同的目录,分支并将您的更改复制到新的工作副本中(但要小心,如果其他人更改了这些文件中的某些内容,您将覆盖他的更改)。

Haven't worked with cvs for ten years or so ;)

I think you have to update your working-copy first. This will merge all changes from the main-branch into your working-copy. If this doesn't help just do a fresh checkout into a different directory, branch away and copy your changes into the new workingcopy (but be careful, if someone else changed something in those files, you are overwriting his changes).

且行且努力 2024-12-05 13:49:50

这是绝对可以做到的,事实上能够做到这一点也是cvs的设计原则之一。

http://cedric.babault.free.fr/TortoiseCVSDoc/ UserGuide_en.html#advanced.branching

its absolutely possible to do this, in fact it was one of the design principle of cvs to be able to do this.

http://cedric.babault.free.fr/TortoiseCVSDoc/UserGuide_en.html#advanced.branching

唠甜嗑 2024-12-05 13:49:50

这实际上并不是非常困难:

  1. 将您的 cvs 根目录复制到新位置
  2. 擦除并重新签出 cvs
  3. 分支
  4. 中的根更新到分支
  5. 将您添加或更改的文件从副本复制回主根目录
  6. 添加内容
  7. 提交
  8. 享受

编辑:值得注意的是,在第 5 步中,请确保不要将任何“CVS”文件夹复制回来

This is actually not terribly difficult to do:

  1. Copy your root cvs directory to a new location
  2. Wipe and re-checkout the root from cvs
  3. Branch
  4. Update to branch
  5. Copy the files you've added or changed from the copy back to the main root directory
  6. Add Content
  7. Commit
  8. Enjoy

Edit: it's worth noting that in step 5, be sure NOT to copy any "CVS" folders back

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