skip to content »

crafuslibo.tk

Updating version control repository

Let’s say we want to get the “Rice” feature from our experimental branch into the mainline. Main may have had other changes, which is ok — we just want to insert the Rice feature. Inside the main trunk, run the command: This command diffs r5-r6 in the experimental branch and applies it to the current location.

This way you can refer to “Release 1.0” instead of a particular build number: In Subversion, tags are just branches that you agree not to edit; they are around for posterity, so you can see exactly what your version 1.0 release contained. You develop new features in your branch and “Reverse Integrate (RI)” to get them into Main.Later, you “Forward Integrate” to bring the latest changes from Main into your branch: Let’s say we’re at Media Player 10 and IE 6.The Media Player team makes version 11 in their own branch.When changes overlap and contradict like this, the VCS may report a conflict and not let you check in — it’s up to you to check in a newer version that resolves this dilemma.A few approaches: Conflicts are infrequent but can be a pain.Imagine peeling off that red sticker and placing it on r1, to get r2. To get from r3 to r4, we remove Juice and add Soup (-Juice, Soup).

Most version control systems store diffs rather than full copies of the file.

Version Control (aka Revision Control aka Source Control) lets you track your files over time. So when you mess up you can easily get back to a previous working version. Our shared folder/naming system is fine for class projects or one-time papers. A good VCS does the following: ) to the repository.

You’ve probably cooked up your own version control system without realizing it had such a geeky name. She checks it out, makes a change (puts “milk” on the list), and checks it back in with a checkin message (“Added required item.”).

Depending on the version control system, creating a branch (copy) may change the revision number.

Now that we have a branch, we can change our code and work out the kinks. Since we’re in a separate branch, we can make changes and test in isolation, knowing our changes won’t hurt anyone. In Subversion, you create a branch simply by copying a directory to another.

This saves disk space: 4 revisions of a file doesn’t mean we have 4 copies; we have 1 copy and 4 small diffs. In SVN, we diff two revisions of a file like this: Notice how “Juice” wasn’t even involved — the direct jump from r1 to r4 doesn’t need that change, since Juice was overridden by Soup.