Skip to content
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

Rename files #239

Closed
johnjacobkenny opened this issue Apr 6, 2018 · 9 comments
Closed

Rename files #239

johnjacobkenny opened this issue Apr 6, 2018 · 9 comments

Comments

@johnjacobkenny
Copy link
Contributor

johnjacobkenny commented Apr 6, 2018

  • 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

@edgardmessias
Copy link
Contributor

Not supported by VSCode at moment

See microsoft/vscode#24846 and microsoft/vscode#43768

@edgardmessias
Copy link
Contributor

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
Copy link
Contributor

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

JohnstonCode added a commit that referenced this issue Apr 16, 2018
Added rename with svn in explorer (See #239)
@edgardmessias
Copy link
Contributor

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

@JohnstonCode
Copy link
Owner

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

@alexdymov
Copy link

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.

@rbyshko
Copy link

rbyshko commented Mar 24, 2021

Is somebody working on this at the moment?

@JohnstonCode
Copy link
Owner

No, feel free to submit a PR

@JohnstonCode JohnstonCode closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2024
@hansWurst-creator
Copy link

@JohnstonCode This issue is bugging me a lot. I would be willing to work on it. Would you accept a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants