SDGator
SDGator

Reputation: 2077

What is the svn equivalent to Perforce's sync/resolve process?

In Perforce, you typically do a two-step syncing process:
p4 sync
p4 resolve

The sync syncs your workspace to the repository and figures out which files are in conflict, and the resolve step does the merging and resolving of conflicts locally without checking anything in or otherwise affecting the repository. And then you can run your regressions, make sure it still works in before you check it in.

What is the svn equivalent to doing this? I know there's got to be a way to do this, but the obvious google searches aren't giving me any answers.

Upvotes: 3

Views: 432

Answers (1)

akton
akton

Reputation: 14386

The steps are:

  1. Use svn update to update the working copy to the HEAD or desired revision or svn merge to merge the changes from a different branch into the working copy.
  2. For each conflicted file, svn creates/modifies four more files:
    1. filename: The original file is modified with markers indicating the lines in conflict.
    2. filename.mine: The original file.
    3. filename.rBASE: The unmodified version of the file at the working copy's revision number (BASE) before the update.
    4. filename.rNEW: The new version of the file from the update.
  3. To fix the conflicts perform one of the following. Each removes the additional files created previously.
    1. Edit each file (filename in the above example) by hand to the desired state then call svn resolved to indicate the conflict has been resolved.
    2. Use svn resolve to pick a particular version, either "base" (filename.rBASE), "working" (filename), "mine-full" (filename.mine) or "theirs-full" (filename.rNEW).
    3. Use svn revert to undo the update of that file.
  4. Use svn commit to update the repository. This will not proceed until all conflicts have been resolved.

See Resolving Conflicts (Merging Other's Changes) for more information.

Upvotes: 3

Related Questions