我将放弃当前的开发线并使用另一个存储库中的开发线 - 如何正确处理这个问题?

发布于 2024-11-08 17:07:50 字数 368 浏览 0 评论 0原文

我目前正在为我协助的课程开发一个多阶段项目。我已经完成了该项目的第一阶段。至于第二部分,我想从我的教授在第一阶段已经完成的代码开始,因为他正在与我们并行进行(实际上,比我们早一点),以确保他要求我们做什么这样做其实是可行的!我教授的代码在另一个仓库中。

现在,我的问题是如何处理这个问题。我的直觉告诉我应该创建一个标签 phase1 并将我当前的主干内容放在那里。之后,我只需擦除主干中的所有内容,并将教授的代码签出到我的硬盘驱动器上的某个文件夹(看来我不能直接将其签出到我的主干文件夹!)。之后,我将复制我刚刚在主干中签出的内容并点击提交。

这是一个正确的近似值吗?我意识到这个会起作用,我只是想知道这是否是完成任务的最干净、最合适的方式!

谢谢

I am currently developing a multi-stage project for a course I'm assisting to . I'm over with the first phase of the project. As for the second part I'll want to start with the code my professor has already done for the first stage, for he is doing it in parallel with us(actually, a bit ahead of us) to make sure what he's asking us to do is actually feasible!. My professor's code is in another repo.

Now, my question is on how to handle this. My gut is telling I should create a tag phase1 and put my current trunk contents there. Afterwards I'll just have to erase all the contents in the trunk and checkout my professor's code to some folder on my hard drive (it seems I cannot just checkout it to my trunk folder directly!). After that, I'll copy what I just checked out in my trunk and hit commit.

Is this a correct approximation? I realize this one will work, I'm just wondering whether this is the cleanest and appropriate way to accomplish the task!

Thanks

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

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

发布评论

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

评论(2

岁吢 2024-11-15 17:07:50

svn mv 将您的 trunk 发送到其他地方,例如 branches/phase1,然后 svn mkdir 一个新的 trunk 您可以在其中签入教授的代码,或者将教授的代码svn import 放入新的主干中。

编辑:正如@forsvarir指出的那样,将教授的代码放在自己的分支上可能是个好主意,这样您就可以根据需要从中合并。

因此,在移动原始trunk后,svn import教授代码到branches/professor(或任何名称),然后svn copy< /code> branches/professortrunk,这样您就可以在教授更新代码时将教授的更改添加到 branches/professor,然后您可以将这些更改合并到trunk

svn mv your trunk to sometwhere else, like branches/phase1, then svn mkdir a new trunk where you can check in your professor's code, or svn import your professor's code into a new trunk.

Edit: As @forsvarir points out, it's probably a good idea to put the professor's code on its own branch so you can merge from it as needed.

So after moving your original trunk, svn import the professors code to branches/professor (or whatever name), and svn copy branches/professor to trunk, this way you can add the professors changes to branches/professor as he updates his code, and you can merge those changes to trunk.

从﹋此江山别 2024-11-15 17:07:50

如果我这样做...

我会将主干设置为教授的开发线。每次教授给你一个新的代码时,相应地更新这个版本,然后将其分支用于你自己的开发(作为阶段 XXXX)。这样,代码中就会有一个明显的流程来说明如何到达每个点。我希望如果您这样做,您应该能够检查您的主干,然后直接从教授的存储库合并更改(从您上次进行的修订开始,一直到教授可能标记为开始的修订)下一阶段)。

根据您当前的设置,我将遵循@Christoffer 建议的方法。

If I was doing this...

I'd set up the Trunk as the Professor's development line. Each time the Professor gives you a new drop of code, update this version accordingly and then branch it for your own development (as phase XXXX). That way, there's an obvious flow through the code for how you got to each point. I would expect if you did this, you should be able to check out your trunk, then merge the changes directly from the Professor's repository (starting from the revision you last took, and up to the revision that the Professor has presumably tagged as the start of the next phase).

With your current setup, I'd follow the approach suggested by @Christoffer.

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