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

Show history for TFVC repositories #87

Merged
merged 5 commits into from
Feb 6, 2017
Merged

Show history for TFVC repositories #87

merged 5 commits into from
Feb 6, 2017

Conversation

jeffyoung
Copy link
Contributor

No description provided.

package.json Outdated
"tfvc.location": {
"type": "string",
"default": "",
"description": "Specify the full path to the TF executable to use for TFVC functionality."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we change "TF executable" to "TF executable or script"? Doesn't matter much, but since we do support tf.cmd, it might be more "correct" to include script.

this._gitClient.OpenFileHistory(this._manager.RepoContext);
} else if (this._manager.RepoContext.Type === RepositoryType.TFVC) {
let editor = window.activeTextEditor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider whether this should simply be "this._manager.Tfvc.TfvcViewHistory()" and all the logic (under the TFVC else branch) be inside there. This would just keep this file a bit smaller.

if (!itemPath) {
this._manager.Telemetry.SendEvent(TfvcTelemetryEvents.OpenRepositoryHistory);
//Just display the history url of the entire repo
Utils.OpenUrl(this._manager.RepoContext.RemoteUrl + "_versionControl?_a=history");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this assume that the RemoteUrl ends in "/"? Do we have a helper that join url paths like path.combine? That would be safer.

this._manager.Telemetry.SendEvent(TfvcTelemetryEvents.OpenFileHistory);
let serverPath: string = itemInfos[0].serverItem;
let file: string = encodeURIComponent(serverPath);
Utils.OpenUrl(this._manager.RepoContext.RemoteUrl + "_versionControl?path=" + file + "&_a=history");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above about remoteUrl.

Copy link
Member

@jpricket jpricket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments, but looks good!

Copy link
Member

@jpricket jpricket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeffyoung jeffyoung merged commit 53a73f8 into master Feb 6, 2017
@jeffyoung jeffyoung deleted the jeyou/tfvc-history branch February 6, 2017 16:50
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