Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Creating the Conflicts section in the viewlet #104

Merged
merged 4 commits into from
Feb 15, 2017
Merged

Conversation

jpricket
Copy link
Member

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.

Also added tests for findconflicts command
User Story #884949
@msftclas
Copy link

Hi @jpricketMSFT, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Jason Prickett). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@@ -220,19 +219,6 @@ export class TfvcSCMProvider implements SCMProvider {
}
}

private getTitle(resource: Resource): string {
Copy link
Member Author

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 {
Copy link
Member Author

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
Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@jeffyoung jeffyoung left a 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
Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants