vscode-perforce icon indicating copy to clipboard operation
vscode-perforce copied to clipboard

Shelved files are shown before workspace files in the changelist

Open davidavetyan opened this issue 1 year ago • 1 comments

When looking at changelists in the Source Control view, shelved files appear before the actual workspace files. For large changelists this means you have to scroll all the way until getting to the actual files which need to be diffed/opened.

I didn't find a setting in the extension or VS Code to change this order. Source Control -> View & Sort -> Sort Changes by Status also didn't work.

davidavetyan avatar Jul 25 '24 05:07 davidavetyan

Hi - sorry I missed your issue

I think that both sort by status and sort by path will sort shelved files first. The sorting is provided by vs code so we have limited options to change it.

For path, this is because for shelved files we provide a depot path to vs code for the file, so it tends to be before any local files For status, I'm not really sure what VS code is using to sort - I can't find any documentation describing it so would have to look into the source, and there isn't anything very obvious in the API that would be used, but maybe there is something that can be changed.

If we want to change the sort order when sorting by path, maybe one option would be to add something to the start of the path we return for shelved files, to force it to the bottom. It would probably look weird though.

mjcrouch avatar Sep 11 '24 15:09 mjcrouch