简体   繁体   中英

Using classes from the trunk in the branch in Subversion

I am learning how to use Tortoise SVN client and Subversion server.

I understand the concept of a branch, however I have a question. Say I have a project that contains one thousand classes and all one thousand classes are required to run the project. I want to make a significant change to two of those classes, then do I have to checkout the entire project to the branch? or is it possible to use 998 classes from the trunk and two classes from the branch?

I want to make a significant change to two of those classes, then do I have to checkout the entire project to the branch?

Yes and no

  • Yes, all files of you project must be in branch
  • No, you haven't to checkout all files from branch into new Working Copy

Explanation

  • You prepare branch as server-side copy of trunk into branch-URL
  • When and if you have Working Copy of trunk, you can switch your WC to created branch
  • Edit and commit to branch needed changes ...
  • Merge branch into trunk

Initial Branching

  • Using Repo-Browser:
    • Start repo-browser with needed repository
    • Select trunk in tree side
    • "Copy" in Context-menu
    • Define target for "Copy to" (.../branches/SOMENAME-OF-BRANCH)

在回购浏览器中复制

  • Using local Working Copy of trunk

WC1

and in dialogue

WC2

(note "From URL")

Generally you need all the project files in the branch so the short answer is yes, you need to have them all under the branch.

But, I recommend you split you project and use libraries (DLLs), so that in your case, you can group the 998 classes in one DLL and leave that project under the trunk and just take the changed files project to be branched.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM