Resolving Conflicts
When you're not using locks, conflicts can occur after you update and fetch a teammate's changes to the same parts of the same file. The version control system can't automatically merge these changes into your working copy without losing work. You need to resolve the conflict before you commit or run flows that use the files. You can use the Flow Designer to resolve conflicts and compare conflicting versions:
- What Do I Do after I Get a Conflict?
- Working with the Temporary Files
- Using the Resolve Conflicts Dialog Box
To open the Resolve Conflicts dialog box
When you update, you can start resolving any conflicts or resolve the conflicts later. In the tree pane or file pane, you can right-click files with the
status and click Version Control > Resolve Conflict.
- See Also
-
Using and configuring locks
You need to follow a lock-edit-unlock workflow to work with projects and other Flow Service files under version control. You can also require locks for other types of files, such as graphics.
What Do I Do after I Get a Conflict?
The following example scenario walks through the basic tasks of resolving conflicts when they occur:
- When conflicts occur: Alice and Bob retrieve revision 1 of Case_Study.txt. In their local working copies, they both edit the intro, changing the first line.
Bob commits his changes, creating revision 2.
- Start interactive conflict resolution: Alice commits her version and gets an error that her working copy is out of date. She updates and gets a conflict. The Flow Service modifies Alice's working copy, adding conflict markers that wrap each conflict. In this example, the Flow Service only adds conflict markers around line one.
<<<<<<< .mine Local content ======= Remote content >>>>>>> .r2
- Check versions: Alice compares the conflicting versions by comparing temporary, generated files. In the Resolve Conflicts dialog box, Alice runs commands to open the default diff program.
- Select a version to resolve the conflict: In the Resolve Conflicts dialog box, Alice selects the version she wants to commit.
Working with the Temporary Files
To resolve conflicts, you work with the following temporary, generated files, which contain the conflicting versions.
| Temporary file | Example | Description |
|---|---|---|
| [Original filename].[base revision] | test.txt.r1 | Contains the revision that your working copy's changes are based on. |
| [Original filename].mine | test.txt.mine | Contains your version of the conflict. |
| [Original file].[the newest revision] | test.txt.r2 | Contains the newest revision in the repository. |
| [Original filename] | test.txt | Contains the results of merging the conflicts. |
Using the Resolve Conflicts Dialog Box
In the Resolve Conflicts dialog box, you can select a version you want to commit. You can also open a diff program to compare versions:
Resolving Conflicts with a Single Version
You can select a version to replace the working copy with:
- Resolve with the base version: Reverts your working copy's changes to the version that your edits are based on. Selects the temporary file that contains the base version.
- Resolve with my version: Restores your local changes. Selects the temporary file that contains your version.
- Resolve with the new version: Overwrites the working copy with the newest revision in the repository, discarding your local changes. Selects the temporary file that contains the newest revision.
- Resolve with the current version: Accepts the current changes to the working copy. Be sure to remove all conflict markers in your diff program: selecting this option will allow you to commit the file even if conflict markers still exist.
Note
After you select a revision and click OK, the conflict's marked as resolved and the temporary files are discarded.
Comparing Conflicting Versions
You can use a diff program to compare and integrate conflicting versions. You'll need to configure a diff program for comparing this type of file in the Flow Designer settings.
You can then do the following:
- In the Left and Right menus, select the versions you want to load in the diff program.
- Click Diff to open the diff program.