svn-scm icon indicating copy to clipboard operation
svn-scm copied to clipboard

Rename files

Open johnjacobkenny opened this issue 7 years ago • 8 comments
trafficstars

  • VSCode Version: 1.21.1
  • OS Version: Windows 10
  • Extension Version: 1.26.1
  • System Language: en
  • SVN Version: 1.9.7

Issue

After renaming versioned files from vs code explorer view, the old filename file shows up as missing and the new filename file as unversioned. Is it possible to hook into the explorer rename event and perform the corresponding svn command to indicate the rename?

Steps to Reproduce

  1. Rename a versioned file in vs code explorer view

SVN Output

Paste here content of "View >> Output >> OUTPUT >> SVN"

Screenshots

johnjacobkenny avatar Apr 06 '18 13:04 johnjacobkenny

Not supported by VSCode at moment

See Microsoft/vscode#24846 and Microsoft/vscode#43768

edgardmessias avatar Apr 06 '18 13:04 edgardmessias

Note: When file are renamed, the const fsWatcher = workspace.createFileSystemWatcher("**"); every run fsWatcher.onDidCreate first, with new URI, and after run fsWatcher.onDidDelete with old URI.

In the source of VSCode, work with create a new copy of object and delete the old.

edgardmessias avatar Apr 13 '18 20:04 edgardmessias

Maybe, we can create a class to listener files changes to detect rename, and prompt to user.

If true, we need rollback the rename and run svn rename

edgardmessias avatar Apr 13 '18 20:04 edgardmessias

API Proposed in VSCode 1.25: https://code.visualstudio.com/updates/v1_25#_local-rename-events

edgardmessias avatar Jul 12 '18 11:07 edgardmessias

vscode.workspace.on[Will|Did]RenameFile was added in 1.41.0 https://code.visualstudio.com/updates/v1_41#_workspace-file-events

JohnstonCode avatar Jan 10 '20 09:01 JohnstonCode

Any update on this? I also tried to set keyboard shortcut for "Rename with SVN" command but the rename command is not executing when I press the key. It only works when clicked from file explorer. Had to go back to Eclipse to perform some basic refactoring actions.

alexdymov avatar Dec 06 '20 10:12 alexdymov

Is somebody working on this at the moment?

rbyshko avatar Mar 24 '21 09:03 rbyshko

No, feel free to submit a PR

JohnstonCode avatar Mar 24 '21 09:03 JohnstonCode