Showing posts with label svn. Show all posts
Showing posts with label svn. Show all posts

Sunday, November 23, 2008

Resove change in using anksvn

The experience in resolving conflict in anksvn is not so nice. If you commit without get update and you can get a conflict message. If you get conflict message box, you can an update, after that svn will automatically merge your file with the latest version file in server. It also make change make copy copy of original working file and rename it as "*.mine", and get a copy of your original file (eg, *.r43), and a copy of the latest version (eg. *.r44) And this file is marked as "conflict". You can examine the merged file, and manually change whatever is necessary. After that you need to mark it as resolve, before commit. You have 4 choice.

  1. Resolve using working copy file, which the merged copy.
  2. Resolve using Orignal file, which is the *.r43 file
  3. Resolve using my file, which the working file before merge (*.mine)
  4. Resolve using their file, which is the *.r44 file.

Make changes to your working copy

There are two kinds of changes to your working copy. File content changes and tree changes. File change is changing the content of a source controlled file. It is tree changes to rename a file, move a file, add a file, delete a file, rename a directory, move a directory, create a directory, delete a directory.

You don't need to tell subversion that you intend to change a file, jsut make your changes using your text editor, word processor, graphics program, or whatever tool you would nor- mally use. Subversion automatically detects which files have been changed, and in addi- tion, it handles binary files just as easily as it handles text files—and just as efficiently, too.

For tree changes, you can ask Subversion to “mark” files and directories for scheduled removal, addition, copying, or moving. These changes may take place immediately in your working copy, but no additions or removals will happen in the repository until you commit them.

The Subversion commands that you will use here are svn add, svn delete, svn copy, svn move, and svn mkdir.

SVN rename

svn move read2.txt .\read4.txt

SVN basic work cycle

  1. Update your local working copy(svn update)
  2. Make changes (svn add, svn delete, svn copy, svn move)
  3. Examine your changes(svn status, svn diff)
  4. Possibly undo some changes (svn revert)
  5. Resove conflicts ( svn update, svn resovle)
  6. Commit your changes (svn commit)

Saturday, November 22, 2008

SVN Recommended Repository Layout

It's a good practice to create one repository for the entire company or department and store all your projects in this repository. Creating separate repository for each project is not a good idea because in that case you will not be able to perform Subversion operations like copy, diff and merge cross-project.

It's not required but usually each projects has 3 subfolders: trunk, branches, tags. The trunk folder contains the main development branch, the branches folder contains subfolders with temporary copies of trunk for experimental development, release stabilization etc. and the tags folder contains copies of the officially released versions.