-
Notifications
You must be signed in to change notification settings - Fork 451
Conversation
src/tfvc/commands/commandhelper.ts
Outdated
@@ -89,6 +89,9 @@ export class CommandHelper { | |||
} | |||
lines = lines.splice(index); | |||
} | |||
if (filterEmptyLines) { | |||
lines = lines.filter(e => e !== ""); |
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.
you may want to trim() here to remove "blank" lines as well. Not sure if you want to or not.
src/tfvc/commands/undo.ts
Outdated
|
||
public constructor(serverContext: TeamServerContext, itemPaths: string[]) { | ||
if (!itemPaths || itemPaths.length === 0) { | ||
throw TfvcError.CreateArgumentMissingError("itemPaths"); |
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.
Use CommandHelper.RequireStringArrayArgument here.
src/tfvc/commands/undo.ts
Outdated
*/ | ||
public async ParseOutput(executionResult: IExecutionResult): Promise<string[]> { | ||
//TODO: (Undo All) What if we've been passed 5 files and the 3rd has no pending changes? | ||
if (CommandHelper.HasError(executionResult, "No pending changes were found for ")) { |
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.
Your TODO is valid. You may have errors and "Undoing edit" lines interlaced. You need to skip those errors and just continue.
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.
You probably want to fix the parsing of the undo to ignore "no pending changes... for" messages.
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
No description provided.