Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between an svn copy and an svn branch?

Tags:

svn

I asked one of my developers to give each dev a different copy of the trunk to work on in /branches (under their own name).

That developer is not experienced in subversion (and neither am I), so I'm trying to determine if he did the right thing by copying the trunk into each branch folder and committing it, or if he should have done something else.

like image 507
cjm2671 Avatar asked Nov 22 '10 10:11

cjm2671


People also ask

What is svn copy?

svn copy (cp) — Copy a file or directory in a working copy or in the repository.

What is an svn branch?

Subversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.

How do I copy a branch in svn?

Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu. In the Create Branch or Tag dialog that opens, in the Copy From section, specify the source folder that will be copied to a branch or a tag.

What is different between branch and tag in svn?

There is no difference between branches and tags in Subversion. The only difference is in what the user then does with the directory. Branches are typically created, edited, and then merged back into the trunk. Alternatively, tags are created as a snapshot of the project at a point in time and then never changed.


2 Answers

Your friend was correct - to create a branch in Subversion you use the svn copy command.

(Source)

like image 177
Mark Byers Avatar answered Oct 13 '22 00:10

Mark Byers


Subversion doesn't have subprojects, branches or tags, only directories and files (and properties). Whether you treat a certain copy as a subproject, a branch, a tag, a backup, just a plain ol' copy or something else entirely is purely a social convention between you and your teammates.

like image 26
Jörg W Mittag Avatar answered Oct 13 '22 00:10

Jörg W Mittag