質問

I have some projects that need to include the source of another project. All projects are managed by revision control software. In fact, they are for now part of the same local bazaar repository. The desired layout would be something like this:

Repository
    MainProject
        code.c
        more_code.py
        OtherProject
            SomeData.txt
    MainProject2
        code.c
        OtherProject
            SomeData.txt
    OtherProject
        SomeData.txt

My experience with such tools is lacking. My initial idea was that the OtherProject subfolder of the MainProjects could somehow link to the actual location of the other project with bzr externals. Still, I am curious if this is the right approach?

(If it is the right approach, extra brownie points for actual bzr examples on how to do it)

役に立ちましたか?

解決

About the organization, I would recommand one repository for each project.

Root  (folder)
    MainProject  (repo)
        code.c
        more_code.py
        OtherProject  (link)
            SomeData.txt
    MainProject2  (repo)
        code.c
        OtherProject  (link)
            SomeData.txt
    OtherProject  (repo)
        SomeData.txt

The link as external is better than copy/paste inside the project. So globally, you are on the good direction !

他のヒント

I believe the bzr-externals plugin would work with your suggested layout, whereas the bzr-scmproj plugin seems to manage a bunch of subdirectories representing different branches as a single branch.

I personally would recommend that you don't embed a copy of or link to OtherProject in the working trees of MainProject and MainProject2 like you've suggested, but rather use a build-time variable to reference OtherProject's location under Repository. But my primary work environment is Windows where I don't have such filesystem features as symbolic links.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top