-
Website
http://adam.blinkinblogs.net/ -
Original page
http://adam.blinkinblogs.net/post/53986817 -
Subscribe
All Comments -
Community
-
Top Commenters
-
Eric
45 comments · 1 points
-
Adam Blinkinsop
48 comments · 1 points
-
firewallender
1 comment · 4 points
-
sydthekid
2 comments · 1 points
-
-
Popular Threads
As far as the computer is concerned, I think a branch is basically a special case of a copy. I think you should expose branch and copy as very distinct operations to the user though.
If you view source control as a directed acyclic graph, like Mercurial does, then I'd agree that branches and copies are both instances of one node having two children. The difference is that a traditional branch is a diverging timeline, but a copy is a diverging "spaceline." In a copy, you're branching in space rather than time, in that now you have two different coordinates within the file namespace that have the same parent node.
Another difference is that you traditionally branch a whole repository, while you'll only copy particular files or perhaps directories within a single repository. In general, I think this is a natural distinction to make, although it may not be universally true. For example, there have been times when I've wanted to spin a certain directory off into its own repository, which is less than intuitive in the source control systems I'm aware of.
I suppose you could resolve this by just viewing a branch as splitting the timeline at the root directory, while a copy is usually splitting at a subdirectory or file somewhere. Then the end result is you basically have a root directory with a bunch of named directories that are the different branches, somewhat like a Subversion repository is laid out. Maybe you've convinced me that branches and copies should be treated the same. I'd still like a "psc (platonic source control) branch" command in addition to the "psc copy" command.