-
Notifications
You must be signed in to change notification settings - Fork 450
Creating the Conflicts section in the viewlet #104
Conversation
User Story #884949
User Story #884949
User Story #884949
Also added tests for findconflicts command User Story #884949
Hi @jpricketMSFT, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
@@ -220,19 +219,6 @@ export class TfvcSCMProvider implements SCMProvider { | |||
} | |||
} | |||
|
|||
private getTitle(resource: Resource): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this into the Resource class.
return Uri.file(serverItem).with({ scheme: TfvcSCMProvider.scmScheme, query: versionSpec }); | ||
} | ||
|
||
public GetTitle(): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved here from the scmprovider class and then altered to handle conflicts.
const foundConflicts: IConflict[] = await this._repository.FindConflicts(); | ||
|
||
//if (foundConflicts.find(c => c.type === ConflictType.NAME_AND_CONTENT || c.type === ConflictType.RENAME)) { | ||
// TODO: Send telemetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see a way to get the Telemetry object from here. Perhaps we need to move it to a singleton like the TFVCOutput class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's a good idea. We should have the ability to send telemetry from wherever we need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
let result: boolean = false; | ||
if (change && change.localItem && conflict && conflict.localPath) { | ||
// TODO: If resource or conflict are renames we have a lot more work to do | ||
// We are postponing this work for now until we have evidence that it happens a lot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want to send telemetry here as well? Or is the comment above at the location where we'd track this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are inside a loop, so we would want it above only
const foundConflicts: IConflict[] = await this._repository.FindConflicts(); | ||
|
||
//if (foundConflicts.find(c => c.type === ConflictType.NAME_AND_CONTENT || c.type === ConflictType.RENAME)) { | ||
// TODO: Send telemetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's a good idea. We should have the ability to send telemetry from wherever we need to.
These changes create the conflict section in the SCM viewlet and allow the user to see the diff of what's local and what's on the server. It does not provide a way to resolve the conflicts yet.