Occasionally, incoming changes modify files that you have already
modified.
In the example below, you modify flux.capacitor/requirements.txt to
include a note from a planning meeting, check the file in, and run
status:
$ lscm show status -C
Workspace: (8551) "myNewWorkspace" <-> (8552) "stream19_test_max_results_1256765247692134"
Component: (8553) "Flux Capacitor"
Baseline: (8554) 1 "Initial Baseline"
Outgoing:
Change sets:
(8617) -!-@ "Update from November planning meeting"
Changes:
!--c- /flux.capacitor/requirements.txt
Incoming:
Change sets:
(8616) -!-$ "Results of initial trials"
Changes:
!--c- /flux.capacitor/requirements.txt
A collision has occurred. The files that you modified were also
modified by another user who delivered changes to the stream. The
collision is noted by the ! in front of the participating files and
the participating change sets. When you accept the change set with
the alias 8616, you have a conflict.
$ lscm accept 8616 -v -i
Repository: https://hostname.example.com:9443/ccm/
Workspace: (8551) "myNewWorkspace"
Component: (8553) "Flux Capacitor"
Change sets:
(8616) ADMIN --#$ "Results of initial trials"
Changes:
-#-c- /flux.capacitor/requirements.txt
Following workspaces still have conflicts after accept:
myNewWorkspace
Run 'scm resolve' or 'scm conflicts' or 'scm status' for help in resolving the conflicts.
The -i inserts conflict markers into files. The markers are similar
to markers that are used by other source control systems.
The # in the list of changes indicates the file has a conflict.
You can get a list of conflicts in the currently loaded sandbox
by running scm conflicts.
The file contains in-place conflict markers, indicating the problem:
- Must not need any more than 1.5 gigawatts of power
- Determine minimum necessary speed
<<<<<<< mine
- Twin Pines parking lot?
=======
- Initial trials suggest 60kmh
>>>>>>> proposed
The line between the <<<<<<< mine and
the equals sign is from the change set in your workspace. The line
between the equals signs and the >>>>>>> proposed is
from the incoming change set. You can get the original file by running lscm
conflicts -m flux.capacitor/requirements.txt. If you want
to get the incoming version, you can run lscm conflicts
-p flux.capacitor/requirements.txt. The -m is
a short form for mine and the -p is a short
form for proposed.
Resolve the change with the proposal. Clear the conflict markers
out of the file:
- Must not need any more than 1.5 gigawatts of power
- Determine minimum necessary speed
Initial trials suggest 60kmh
Commit the change and communicate to the repository that the conflict
has been resolved with the version that was checked in by running lscm
resolve conflict:
lscm resolve conflict -c flux.capacitor/requirements.txt
No output indicates that the conflict has been resolved.
The -c indicates that the conflict should
be resolved with the version that is checked in. You can also use -p to
resolve with the proposed version.
You can now make more changes, or deliver the change set with lscm
deliver:
$ lscm deliver
Delivering changes from "myNewWorkspace" into "DeLorian Updates"
No baselines to flow.