SVN for Sublime Text
Usage
Interfaces
Basic operations are made available via context Menus.The full SVN feature-set is exposed through the Command Palette.
Command Palette
Opening the command palette will show SVN commands based on the currently open file, or if no file is open, the first open folder. When using the command palette, all command are shown, even if they are not applicable to the current file or folder. This is done because checking the status of a file before opening the command palette would cause the interface to hang.
- If the current file is not a working copy, will be shown.
- If the working copy is in an old format, the command will be shown.
- If in a working copy, all other commands will be available. The commands can be used to filter the list down to the commands that are applicable based on the file or folder’s current SVN status.
Please see Commands for a full list of all commands, along with details about the exact functionality and when they are visible.
Commands
The primary interface for SVN is the command palette. See Command Palette for details. The following is an exaustive list of the available commands.
- Show Applicable Working Copy Commands
- Add, Interactive…
- Branch…
- Cleanup
- Commit…
- Custom Command…
- Delete, Interactive…
- Diff
- Diff, Custom Revisions…
- Diff, Remote
- Edit Last Command…
- Info
- Log
- Merge…
- Relocate…
- Resolve Tree Conflict, Interactive…
- Revert, Interactive…
- Status
- Switch…
- Unlock, Interactive…
- Update
- Update, Including Externals
- Upgrade to Newer Working Copy Format
- Show Applicable File Commands
- Add
- Add to Changelist…
- Blame
- Commit…
- Copy…
- Delete
- Diff
- Diff, Custom Revisions…
- Diff, Remote
- Ignore
- Info
- Lock
- Log
- Move…
- Properties…
- Remove from Changelist
- Resolve, Interactive…
- Resolve Property Conflict, Interactive…
- Resolve Tree Conflict, Interactive…
- Revert
- Status
- Unignore
- Unlock
- Update
Universal Commands
- Checkout…
- The user will be presented with an input to enter the URL to check out from, and then an input to specify the folder to check out into. With default settings, the user’s last choices will be remembered for next time. See default_checkout_url and default_checkout_folder to change this behavior.
Working Copy Commands
- Show Applicable Working Copy Commands
- Runs the status command on the working copy to determine which commands are current applicable, and then filters the command palette down to show only those commands. If you have a large working copy, this make take some time.
- Add, Interactive…
- Presents a buffer with all unversioned paths listed, allowing the user to pick which files and folders to add. Saving the buffer adds the selected paths. Closing the buffer without saving cancels.
- Branch…
- Prompts the user to provide a branch name, after which the
/trunk/
is copied to/branches/
with the provided name. The working copy is switched to the new branch automatically. - Cleanup
- Runs the SVN cleanup command for when a working copy gets locked due to incomplete operations. Only shown when a path in the working copy is locked.
- Commit…
- Presents a buffer to the user allowing them to input a commit message and select the paths to commit. Saving the buffer commits the selected paths. Closing the buffer without saving cancels.
- Custom Command…
- Opens a temporary buffer with the current working copy status and presents an input for the user to type command line SVN command with arguments. The temporary buffer is automatically closed when the command is run. Pressing escape cancels.
- Delete, Interactive…
- Presents a buffer with all missing paths listed, allowing the user to pick which files and folders to delete. Saving the buffer deletes the selected paths. Closing the buffer without saving cancels.
- Diff
- Generates a diff of all modified files and folders in the working copy between the last commit and the current working copy state. By default the diff is opened in a new buffer and is shown with syntax highlighting. The diff_command setting can be used to specify an external diff tool.
- Diff, Custom Revisions…
- Opens a temporary buffer with the log of the working copy and presents an input for the user to specify a range of revisions to run the diff command for. Pressing escape cancels.
- Diff, Remote
- Generates a diff of all files and folders in the working copy against the latest versions of all files and folders in the repository.
- Edit Last Command
- This command is available via the command palette when the output of a previous command is still open in a buffer. This will take the previous command and place it in an input field so that it can be edited and re-run. This is useful for things like changing the number of log entries to be shown, or changing the revision number for a diff.
- Info
- Presents a buffer showing the info for the working copy.
- Log
- Presents a buffer with the last 10 log entries for the working copy. More log entries can be shown by opening the command palette and selecting the Edit Last Command command.
- Merge…
- Presents the quick panel allowing the user to Reintegrate a Branch back into trunk, or run a Custom Merge.
If reintegrating a branch, the working copy with be switched to trunk (if necessary) and the merge will be performed in the working copy. The merge will not be recorded until a commit is performed. After committing, the user will be prompted if they would like to delete the (old) branch.
The Custom Merge will present inputs for the user to specify a URL from the repository to merge into the working copy. The^
character reprents the remote repository root. Once a path is specified, a temporary buffer will be presented with the log for that path, and the user will be prompted for the revision range they would like to merge. The merge will not be recorded until a commit is performed. - Relocate…
- Presents an input to enter the repository URL to change to. A working copy should only be relocated to a different URL that contains the same actual repository, such as when a domain name changes. To change what part of a repository is checked out, use Switch instead.
- Resolve Tree Conflict, Interactive…
- Presents the user with the quick panel, allowing them to accept the working copy state as the resolution for the tree conflict. See Tree Conflicts for more info about when tree conflict occur and how to achieve the desired resolution.
- Revert, Interactive…
- Presents a buffer with all modified paths listed, allowing the user to pick which files and folders to revert. Saving the buffer reverts the selected paths. Closing the buffer without saving cancels.
- Status
- Presents a buffer showing the current SVN status of the working copy.
- Switch…
- Presents an input to enter the repository path to switch to. The
^
character represents the remote repository root. A working copy can only be switched to another path within the same repository. If the repository URL changed, use Relocate instead. - Unlock, Interactive…
- Presents a buffer with all paths with a lock token listed, allowing the user to pick which files and folders to unlock. Saving the buffer unlocks the selected paths. Closing the buffer without saving cancels.
- Update
- Updates the working copy with the latest revisions from the repository, showing the output in a buffer. Externals are ignored.
- Update, Including Externals
- Updates the working copy with the latest revisions from the repository, showing the output in a buffer. Externals are included.
- Upgrade to Newer Working Copy Format
- This is only available if the package detects an SVN 1.6 working copy being accessed by a 1.7+ client, or a 1.7 working copy being accessed by a 1.8 client. This command will upgrade the working copy format.
Folder Commands
- Show Applicable Folder Commands
- Runs the status command on the folder to determine which commands are current applicable, and then filters the command palette down to show only those commands.
- Add (Folder)
- Adds the selected folder to the working copy. Only shown if the folder is unversioned.
- Copy (Folder)…
- Presents an input to specify a working copy path to copy the selected folder to.
- Commit (Folder)…
- Presents a buffer to the user allowing them to input a commit message and select the paths to commit. Saving the buffer commits the selected paths. Closing the buffer without saving cancels.
- Delete (Folder)
- Deletes the selected folder from the working copy.
- Diff (Folder)
- Generates a diff of all modified files and folders in the selected folder between the last commit and the current working copy state. By default the diff is opened in a new buffer and is shown with syntax highlighting. The diff_command setting can be used to specify an external diff tool.
- Diff, Custom Revisions (Folder)…
- Opens a temporary buffer with the log of the folder and presents an input for the user to specify a range of revisions to run the diff command for. Pressing escape cancels.
- Diff, Remote (Folder)
- Generates a diff of all files and folders in the folder against the latest versions of all files and folders in the repository.
- Ignore (Folder)
- Adds the folder to the
svn:ignore
property. Only shown for unversioned folders. - Info (Folder)
- Presents a buffer showing the info for the folder.
- Log (Folder)
- Presents a buffer with the last 10 log entries for the selected folder. More log entries can be shown by opening the command palette and selecting the Edit Last Command command.
- Move (Folder)…
- Presents an input to specify a working copy path to move the selected folder to.
- Properties (Folder)…
- Shows a quick panel providing options to list, add, edit and delete properties for the selected folder. Only shown if the hide_commands setting does not include
"properties"
. - Resolve Property Conflict, Interactive (Folder)…
- Presents the user with the quick panel, allowing them to see the property conflicts for the selected folder, edit the properties and finally resolve the conflicts by accepting the current property values. See Property Conflicts for more details.
- Resolve Tree Conflict, Interactive (Folder)…
- Presents the user with the quick panel, allowing them to accept the working copy state of the selected folder as the resolution for the tree conflict. See Tree Conflicts for more info about when tree conflict occur and how to achieve the desired resolution.
- Revert (Folder)
- Reverts the selected folder to its unchanged state.
- Status (Folder)
- Presents a buffer showing the current SVN status of the selected folder.
- Unignore (Folder)
- Removes the selected folder from the
svn:ignore
property. Only shown if the folder is currently ignored. - Update (Folder)
- Updates the folder with the latest revisions from the repository, showing the output in a buffer. Externals are ignored.
- Update, Including Externals (Folder)
- Updates the folder with the latest revisions from the repository, showing the output in a buffer. Externals are included.
File Commands
- Show Applicable File Commands
- Runs the status command on the file to determine which commands are current applicable, and then filters the command palette down to show only those commands.
- Add (File)
- Adds the selected file to the working copy. Only shown if the file is unversioned.
- Add to Changelist (File)…
- Presents the quick panel, allowing the user to add the selected file to an existing changelist, or a new one. Only shown if the hide_commands setting does not include
"changelists"
(which it does, by default) and if the file is not already part of a changelist. - Blame (File)
- Presents a buffer showing every line of the selected file with the revision the line was last edited during, and what user performed the revision.
- Commit (File)…
- Presents a buffer to the user allowing them to input a commit message and select the file. Saving the buffer commits the file. Closing the buffer without saving cancels.
- Copy (File)…
- Presents an input to specify a working copy path to copy the selected file to.
- Diff (File)
- Generates a diff of the selected file between the last commit and the current working copy state. By default the diff is opened in a new buffer and is shown with syntax highlighting. The diff_command setting can be used to specify an external diff tool.
- Diff, Custom Revisions (File)…
- Opens a temporary buffer with the log of the selected file and presents an input for the user to specify a range of revisions to run the diff command for. Pressing escape cancels.
- Diff, Remote (File)
- Generates a diff of the file against the latest versions of the file in the repository.
- Delete (File)
- Deletes the selected file from the working copy.
- Ignore (File)
- Adds the file to the
svn:ignore
property. Only shown for unversioned files. - Info (File)
- Presents a buffer showing the info for the file.
- Lock (File)
- Locks the selected file. Only shown if the hide_commands setting does not include
"locking"
(which it does, by default). - Log (File)
- Presents a buffer with the last 10 log entries for the selected file. More log entries can be shown by opening the command palette and selecting the Edit Last Command command.
- Move (File)…
- Presents an input to specify a working copy path to move the selected file to.
- Properties (File)…
- Shows a quick panel providing options to list, add, edit and delete properties for the selected file. Only shown if the hide_commands setting does not include
"properties"
. - Remove from Changelist (File)
- Removes the selected file from the changelist it is currently part of. Only shown if the hide_commands setting does not include
"changelists"
(which it does, by default) and if the file is already in of a changelist. - Resolve, Interactive (File)…
- Presents a quick panel with options to review the conflict and choose a resolution:
- Review Old Repository Version
- Review My Version
- Review New Repository Version
- Review/Edit Merged Version
- Resolve with My Version
- Resolve with New Repository Version
- Resolve with Merged Version
- Resolve Property Conflict, Interactive (File)…
- Presents the user with the quick panel, allowing them to see the property conflicts for the selected file, edit the properties and finally resolve the conflicts by accepting the current property values. See Property Conflicts for more details.
- Resolve Tree Conflict, Interactive (File)…
- Presents the user with the quick panel, allowing them to accept the working copy state of the selected file as the resolution for the tree conflict. See Tree Conflicts for more info about when tree conflict occur and how to achieve the desired resolution.
- Revert (File)
- Reverts the selected file to its unchanged state.
- Status (File)
- Presents a buffer showing the current SVN status of the selected file.
- Unignore (File)
- Removes the selected file from the
svn:ignore
property. Only shown if the file is currently ignored. - Unlock (File)
- Unlocks the selected file. Only shown if the hide_commands setting does not include
"locking"
(which it does, by default) and if the file is currently locked. - Update (File)
- Updates the file with the latest revisions from the repository, showing the output in a buffer.