编辑后如何分支CVS?
在阅读了文档和文档后,我正在努力掌握 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
通过取消选中“分支创建”对话框中的“检查文件是否未修改”,可以轻松完成此操作。
创建分支后,通过执行更新特殊并选择新分支来切换到该分支(您可能需要单击更新列表...才能使新分支出现)。本地修改的文件将不受此更新的影响(前提是您不勾选清理副本)。然后只需照常进行提交即可使您的更改显示在新分支中。
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.
实际上不可能完成这项任务。终于实现了 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).
大约有十年没有使用简历了;)
我认为你必须首先更新你的工作副本。这会将主分支的所有更改合并到您的工作副本中。如果这没有帮助,只需重新签出到不同的目录,分支并将您的更改复制到新的工作副本中(但要小心,如果其他人更改了这些文件中的某些内容,您将覆盖他的更改)。
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).
这是绝对可以做到的,事实上能够做到这一点也是cvs的设计原则之一。
its absolutely possible to do this, in fact it was one of the design principle of cvs to be able to do this.
这实际上并不是非常困难:
编辑:值得注意的是,在第 5 步中,请确保不要将任何“CVS”文件夹复制回来
This is actually not terribly difficult to do:
Edit: it's worth noting that in step 5, be sure NOT to copy any "CVS" folders back