Ability to re-load a file from remote #8
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds an option called "Reload From Remote" to the file context menu.
If the buffer is open, it will be closed (appropriate warning displayed if there are local changes).
Once close, the file will be opened again
Test-cases:
Test-case-1: Open remote tree view (but file is not yet opened), right click on file and "Reload From Remote"
Expected outcome: Since file is not open, nothing happens (i.e this will not result in opening the file)
Result: Pass
Test-case-2a: Open a remote file, then, without making any local change - do "Reload From Remote"
Expected outcome: File should reload
Result: Pass
Test-case-2b: Open a remote file, then make a change on remote. Don't make any local change - do "Reload From Remote"
Expected outcome: File should reload and the remote changed content should be visible
Result: Pass
Test-case-4a: Open a remote file, Make a local change - do "Reload From Remote". A dialog box will appear indicating that "you will lose your local changes if you reload from remote". Press No
Expected outcome: Nothing happens, the file is not reloaded the local buffer remains
Result: Pass
Test-case-4b: Open a remote file, Make a local change - do "Reload From Remote". A dialog box will appear indicating that "you will lose your local changes if you reload from remote". Press Yes
Expected outcome: Local buffer is closed (lost) and remote content is loaded.
Result: Pass