posted by Carlos Leonhard Woelz on Fri 20th Feb 2004 07:29 UTC

"Learning CVS, Page 6/7"

Resolving Conflicts

A conflict occurs because while you where working on the file, another developer committed some changes that affect the same lines you were working with. You will have edit the file and merge the modifications in a meaningful way.

CVS marks the conflicting changes in the following manner:

<<<<<<<
Changes in your working folder
=======
Changes in the Repository
>>>>>>> revision_number

You should replace this whole block with the new merged version. Then you can commit or create a patch against the repository.

Fortunately, Cervisia offers a nice interface for handling these conflicts. This does not mean that you will never need to manually edit the files, but eliminate the need to do so for the trivial conflict resolution.

- Open the sandbox (working directory) where the files are located.
- In Cervisia's Main Window, select the conflicting file.
- Click the "View Menu", and then the "Resolve..." menu item. (You can also right click the file to access this menu item).
- Cervisia's conflict resolver will pop up.
- You can easily go forward to the next conflict and backwards by pressing the "<<" or ">>" buttons.
- The "A" button in the bottom left part of the dialog keep your modifications and remove the repository modifications for that specific conflict (they can be more than one per file).
- The "B" button does the opposite: keep the repository modifications and remove your modifications.
- The "A+B" button merge the modifications using yours as the base.
- The "B+A" button merge the modifications using the repository modifications as the base.
- The edit button lets you manually merge the modifications.

The Commit Process: Changing, Adding and Removing Files and Folders

Committing Your Changes to The Repository

In CVS language, to commit means to perpetrate the changes from your working folder to the repository. In order to commit to a network repository, you must have a CVS account, and you will need to retrieve the involved modules using this account. Anonymous CVS does not allow committing. It is strongly recommended that you read the project guidelines for developers and contributors before committing. For instance, the KDE project has a Developer's FAQ and a CVS Commit Policy Page to guide new contributors.

To commit a file or group of files to the repository, do the following actions.

- Click the "File" menu then the "Open Sandbox..." menu item.
- Select a working folder / module in the file dialog.
- Select the files or folders you want to commit.
- Note that Cervisia performs menu and toolbar actions only to selected files or folders. If you select a file, only it will be committed, but if you select a folder, all modified files in the folder will be committed (if you checked the "Commit & Remove Recursively" check box in the Settings Menu, Cervisia will commit all modified files from the subfolders too).
- Click the "File" menu then the "Commit..." menu item, or simply press the Commit (Up) button in the toolbar.
- The Commit Dialog will pop up.
- Type the log message describing your changes. If you want to use one of your older log messages, Cervisia stores them in the "Older messages" dropdown.
- Click OK.

Table of contents
  1. "Learning CVS, Page 1/7"
  2. "Learning CVS, Page 2/7"
  3. "Learning CVS, Page 3/7"
  4. "Learning CVS, Page 4/7"
  5. "Learning CVS, Page 5/7"
  6. "Learning CVS, Page 6/7"
  7. "Learning CVS, Page 7/7"
e p (0)    25 Comment(s)

Technology White Papers

See More