开发者

I'll drop my current development line and use one from another repo instead - how to correctly handle this?

开发者 https://www.devze.com 2023-03-06 19:03 出处:网络
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 ha

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 te开发者_运维知识库lling 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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消