Changes diff to compare

This commit is contained in:
Eric Amodio
2017-04-01 02:49:13 -04:00
parent 0c13050387
commit d59f4ef6dc
7 changed files with 17 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ export class DiffDirectoryCommand extends ActiveEditorCommand {
try {
const repoPath = await this.git.getRepoPathFromUri(uri);
if (!repoPath) return window.showWarningMessage(`Unable to open directory diff`);
if (!repoPath) return window.showWarningMessage(`Unable to open directory compare`);
if (!shaOrBranch1) {
const branches = await this.git.getBranches(repoPath);
@@ -49,7 +49,7 @@ export class DiffDirectoryCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffDirectoryCommand');
return window.showErrorMessage(`Unable to open directory diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open directory compare. See output channel for more details`);
}
}
}

View File

@@ -31,7 +31,7 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
try {
const blame = await this.git.getBlameForLine(gitUri, blameline);
if (!blame) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
if (!blame) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
commit = blame.commit;
@@ -50,7 +50,7 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithPreviousLineCommand', `getBlameForLine(${blameline})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
@@ -65,7 +65,7 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithPreviousLineCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
}

View File

@@ -29,7 +29,7 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
try {
const blame = await this.git.getBlameForLine(gitUri, blameline);
if (!blame) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
if (!blame) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
commit = blame.commit;
// If the line is uncommitted, find the previous commit
@@ -40,7 +40,7 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffLineWithWorkingCommand', `getBlameForLine(${blameline})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}

View File

@@ -41,7 +41,7 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithBranchCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
}

View File

@@ -43,13 +43,13 @@ export class DiffWithNextCommand extends ActiveEditorCommand {
const sha = (commit && commit.sha) || gitUri.sha;
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, undefined, sha ? undefined : 2, rangeOrLine as Range);
if (!log) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
if (!log) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());
}
catch (ex) {
Logger.error(ex, 'DiffWithNextCommand', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
@@ -67,7 +67,7 @@ export class DiffWithNextCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithNextCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
}

View File

@@ -44,13 +44,13 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
const sha = (commit && commit.sha) || gitUri.sha;
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, undefined, sha ? undefined : 2, rangeOrLine as Range);
if (!log) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
if (!log) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());
}
catch (ex) {
Logger.error(ex, 'DiffWithPreviousCommand', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
@@ -69,7 +69,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithPreviousCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
}

View File

@@ -28,11 +28,11 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
try {
commit = await this.git.getLogCommit(gitUri.repoPath, gitUri.fsPath, gitUri.sha, { firstIfMissing: true });
if (!commit) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
if (!commit) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
}
catch (ex) {
Logger.error(ex, 'DiffWithWorkingCommand', `getLogCommit(${gitUri.repoPath}, ${gitUri.fsPath}, ${gitUri.sha})`);
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
@@ -47,7 +47,7 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
}
catch (ex) {
Logger.error(ex, 'DiffWithWorkingCommand', 'getVersionedFile');
return window.showErrorMessage(`Unable to open diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
}
}
}