Domanda

Sorry to ask such a basic question, but I'm trying to set up a new development environment using SVN for the first time, and while I can find plenty of explanation of how to work with /trunk /branch and /tag folders in the repository, I can't figure out if these folders are replicated in the local working copy?

In other words, if I have a repository that looks like this:

/repo-root
   /project1
      /trunk
      /branch
      /tags
   /project2
      /trunk
      /branch
      /tags

Would my working copy tree have to look like this also:

/dev_folder
   /project1
      /trunk
      /branch
      /tags
   /project2
      /trunk
      /branch
      /tags

While this might sound like a stupid question, it would seem that I could check out code from /trunk or /root to a single local directory tree, switching from one to the other as needed, but maybe I'm completely misunderstanding the workflow when having trunk and branch directories in the repository.

Thanks!

È stato utile?

Soluzione

This depends on you, it is your choice. But typically that is not the case.

You can checkout whatever part of the repository you chose. Think of it like copying files from a directory structure: it is your decision which part of the structure you copy. You do that by specifying the path to the folder to copy. Same with svn which in the end is best understood as nothing else but a file system (hierarchy) with an additional time axis. So whatever "folder" in there you specify in the url during the checkout is what is contained in your working copy.

Note that "trunk" and "branch" are just names to svn. They do not have some special or magical meaning.

That said: typically one checks out either the trunk or a branch. and likewise typical one has multiple checkouts/working copies in parallel, mirroring different parts of the repository.

Oh, and a simple hint: just try such things out! You can make as many checkouts as you like without altering the repository at all. You can simply delete them again. So make your tests and find out!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top