JohnstonCode/svn-scm

Feature: SVN status in file explorer

agrlh opened this issue ยท 25 comments

agrlh commented

I'd love to see the SVN status indicated with colors/icons in the file explorer similar to the GIT integration in 1.18:

GIT file explorer decorations
Image stolen from microsoft/vscode#178

Maybe it's possible to reuse the git code from the official extension: https://github.com/Microsoft/vscode/tree/master/extensions/git ?

I'd be happy to help out, if you can provide me some pointers on where to start (I'm new to VSCode)

Hi @arppl

This is something that I have wanted to implement. So far I have not found any docs on how to implement this.

I have also looked through the git extension source and can't see anything that stands out.

If you can find any references please let me know.

It seems to be implemented only inside the git extension. From the Changelogs of 1.18:

There is also a proposed API to allow extension authors to add color decorations to arbitrary resources. We haven't finalized on anything yet but are eager to learn how you would use decorations.

Maybe contact microsoft directly?

Ta, I will have a look.

See the link: https://code.visualstudio.com/updates/v1_18#_git-status-in-file-explorer

There is also a proposed API to allow extension authors to add color decorations to arbitrary resources.

In addition, I'd like to see the revision of a file at least in the SCM view

@JohnstonCode, you can test my branch?
https://github.com/edgardmessias/svn-scm/tree/status_file_explorer

How to enable:

  • Open the file: <vscode path>\resources\app\product.json
  • Find extensionAllowedProposedApi
  • Append "johnstoncode.svn-scm" in the array

Example:
From

{
	"extensionAllowedProposedApi": [
		"ms-vsliveshare.vsliveshare"
	]
}

To:

{
	"extensionAllowedProposedApi": [
		"ms-vsliveshare.vsliveshare", "johnstoncode.svn-scm"
	]
}

This trick is to avoid putting "enableProposedApi": true in package.json, allowing to publish in marketplace

@edgardmessias

Unversioned doesn't seem to work in the file explorer but does in the SCM view.

Yeah looks good and works

More suggestion?
Should we release a version?

If you create a PR I will merge it and release it. Get some real-world feedback that way

Okay, I'll do some documentation first.

Has this been resolved? I am using svn in combination with VS Code 1.21.1 and cannot get the color-coding work in Windows or macOS.

This uses the ProposedApi once VS code releases it fully it should work.

@edgardmessias Oh, cool, thanks. A typical variant of RTFM, I guess :-)

It only works if we open a folder which is a SVN repository (or its subfolder).
If I open a superfolder it does not work.

It works only partially for me, having opened an svn-controlled folder also containing two svn externals.
Added files in the externals have an A and are colorized (green); their parent directories are also green.

However, modified files, while flagged with an M, are only briefly colorized orange, before being overwritten by a darkish grey color.

@Zastai, please, open a new issue

It would be nice to put this also in the documentation, where to find product.json:
/usr/share/code/resources/app/product.json

I was looking for a long time. I think this is the default location.

Thank you @Remzi1993 !!! Fully agree with your suggestion

Hey guys, I'm trying to get this feature to work, but I had not succeed.
Now the product.json file has this entry

{
    "extensionEnabledApiProposals": {
        "ms-vsliveshare.vsliveshare": ["contribMenuBarHome", "diffCommand", "documentFiltersExclusive", "fileSearchProvider", "findTextInFiles", "notebookCellExecutionState", "notebookContentProvider", "notebookDocumentEvents", "notebookEditor", "notebookEditorEdit", "notebookLiveShare", "terminalDimensions", "terminalDataWriteEvent", "textDocumentNotebook", "textSearchProvider"]
    }
}

I tried to add

        "johnstoncode.svn-scm": [],

next to the "ms-vsliveshare.vsliveshare" entry but didn't notice any difference in file explorer or source control panels.

Any help is appreciated ๐Ÿ˜€

@allanforever , this option was removed a long time a go:
7fb3966

This option only exists for versions <2

@edgardmessias : is there any other way to (highlight/mark down/put emblem/check) changed files in the Explorer panel?
I can see the list of changed files in Source Control panel, but I would love to see something (even an *) beside the filename in the Explorer panel.
Thanks a lot!