-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compatibility with GitExtensions v4.1 & Gerrit server v3.7.0 #74
Conversation
… exception - Due to the move of GitCommands Fix the parsing of the remote command lines output to retrieve the gerrit change URI - Keep the legacy parsing using 'New Changes' line - Following gerrit v3.7.0 remote outputs modifications take care of '[NEW]' at the end of line - Use a global regex on the command line ouput to retrieve the change URI in bot cases - Add a unit test with both use cases with command outputs test resource files Update the README to indicates supported version (master-branch needs to be updated at release time depending of the new version the plugin will take)
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.
👍
<None Update="TestResources\NewChange_GerritLegacy.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="TestResources\NewChange_GerritNew.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="TestResources\UnparsableUri.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="TestResources\UpdatedChange_GerritNew.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="TestResources\UpdatedChange_GerritLegacy.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> |
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.
<None Update="TestResources\NewChange_GerritLegacy.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="TestResources\NewChange_GerritNew.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="TestResources\UnparsableUri.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="TestResources\UpdatedChange_GerritNew.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="TestResources\UpdatedChange_GerritLegacy.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="TestResources\*.txt"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> |
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.
👍
@@ -27,6 +28,26 @@ internal static class GerritUtil | |||
var fetchUrl = GetFetchUrl(module, remote); | |||
|
|||
return await RunGerritCommandAsync(owner, module, command, fetchUrl, remote, stdIn).ConfigureAwait(false); | |||
} | |||
|
|||
public static bool HadNewChange(string commandPrompt, out string changeUri) |
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.
Assert that commandPrompt
isn't null or empty.
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.
👍
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.
Thanks!
With pleasure, |
Fix missing method implementation OsShellUtil.OpenUrlInDefaultBrowse exception:
Fix the parsing of the remote command lines output to retrieve the gerrit change URI:
Update the README to indicate supported version (master-branch needs to be updated at release time depending of the new version the plugin will take)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The current behaviour is an exception with GitExtensions v4.1 when opening the change URI after publishing it
It's also to have the new change URI poping up with the GerritServer v3.7.0
Issue Number: N/A
What is the new behavior?
The plugin correctly open new changes URIs in GitExtensions v4.1 and with GerritServer v3.7.0
Does this PR introduce a breaking change?
Other information
Like last time : I used this plugin every day and could be cool if we can have a quick release of it to have the benefits of the v4.1 of GitExtensions 😇