Subversion merging changes from a different repository

前端 未结 3 1102
逝去的感伤
逝去的感伤 2020-12-13 04:05

I\'m really confused. I want to do something that a) seems like it should be pretty simple, and b) other people must do all the time, but I cant find out the best w

3条回答
  •  佛祖请我去吃肉
    2020-12-13 04:19

    I've just tried a brief experiment with TortoiseSVN:

    Creating the test repositories

    1. create two new repositories in rep1 and rep2
    2. check out rep1 into co1
    3. add a text file to co1 and check it in
    4. export rep1 to ex1
    5. import ex1 into rep2

    At this stage you will be in the state of having created your local 'branch' in a new repository. The last two steps are all you need for an existing project.

    To simulate some changes to the original repo, modify the text file in co1 and commit the changes.

    Merging Changes

    Now, to create your own working copy, check out rep2 into co2.

    We should be ready to try merging from rep1 into co2.

    Open the merge dialog for co2 and point it at rep1.

    For the 'from' revision select the revision at which you exported your copy (in this case revision 1), or the revision that you last updated your local copy to.

    For the 'to' revision select the HEAD or the latest update you want to apply.

    Results

    This seems to work as expected, with the modifications from rep1 being applied to the working copy of rep2 in co2. These then need to be committed back to your local repository.

提交回复
热议问题