How to resolve a conflict using lscm?
I'm getting a funny message, maybe I'm reading it wrong. I tried to deliver a set of files and had a few conflicts:
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm conflicts
Conflicts:
C-- /arscli-prod.properties (Added <-> Added)
Cc- /build.gradle (Modified <-> Modified)
Cc- /buildnumber.properties (Modified <-> Modified)
Cc- /gradle.properties (Modified <-> Modified)
Cc- /buildSrc/src/main/groovy/ArfMaker.groovy (Modified <-> Modified)
Cc- /buildSrc/src/main/groovy/CompareWtoS.groovy (Modified <-> Modified)
Problem running 'conflicts':
Unresolved conflicts remain.
So I went through them and resolved each of them like this:
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm resolve -c buildnumber.properties
Conflicted items have been successfully resolved.
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm resolve -c gradle.properties
Conflicted items have been successfully resolved.
<etc>
When I get to the last one, I get this:
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm resolve -c arscli-prod.properties
Problem running 'resolve':
"arscli-prod.properties" is not in conflict.
Yet:
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm conflicts
Conflicts:
C-- /arscli-prod.properties (Added <-> Added)
Problem running 'conflicts':
Unresolved conflicts remain.
And:
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm deliver
Problem running 'deliver':
Remote workspace has conflicts. They must be resolved before delivery.
The "non-conflict" conflict, does look a bit different - there's not a small "c" in the result of the conflicts command.
Nevertheless, I'm not sure how to clear this. Am I doing something wrong?
- Andy
Accepted answer
Andy,
You have used the command correctly but I am not sure why it is not resolving the conflict. By the way, the small 'c' stands for content change and there is another attribute 'p' which stands for property change. The capital 'C' indicates regular conflict and there are other types of conflicts.
Can you try listing the changes of the change set that has arscli-prod.properties file? Use 'lscm list changes'. Use the alias/uuid of that file in the resolve command instead of the path of the file.
Comments
That was it! Thanks, Shashikant!
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm -u y ls changes 2214
Change sets:
(2214:_WIuaQVPvEeObJfZOCm0eyA) ---$ Andrew P Jewell "add arscli prod file"
Component: (2132:_FE_KIE4VEeObJfZOCm0eyA) "master"
Modified: 22-Nov-2013 07:35 PM
Changes:
--a-- (2275:_WGovkFPvEeO-XLN1fBncEA) \master\arscli-prod.properties
Work items:
(2158:_cTV3YAnKEeOaqcwlqKRq2Q) 14 "Share MBE Build code with Jazz Source Control"
C:\Users\O386600\mbe-workspaces\build_process_o386600\master>lscm resolve -c _WGovkFPvEeO-XLN1fBncEA
Conflicted items have been successfully resolved.
I will raise a defect on conflicts not being able to be resolved based on path for Add-Add conflict.
Is there any other way to get the alias/uuid of a file?
I believe you mean the file in the change set? If so, use "scm list changes <change-set-alias/uuid>" which will list you the aliases of all the files in the change set.
or use "scm -u y list changes <change-set-alias/uuid>" which would list you the uuids.