Introduction

The philosophy of DSH is “everything is a plugin”. If you perform daily development within the web sidebar but your project still uses SVN, lacking a direct entry point to view status, diffs, and commit history can be quite cumbersome. dsh-better-sidebar-svn is a plugin designed for dsh-better-sidebar, bringing common SVN operations into the sidebar.

Below, we introduce its capabilities, installation method, and boundaries to be aware of during use.

What is this

ztyhehe/dsh-better-sidebar-svn is a web-based DSH plugin that depends on dsh-better-sidebar >=0.12.0. It adds an SVN tab to the sidebar, supporting common operations such as status, diff, log, commit, update, and revert.

This plugin is maintained by ztyhehe and utilizes the system’s svn command-line tool to perform actual operations. SVN commands uniformly use --xml output and are executed in a non-interactive manner. The license is MIT.

Core Features

  • Status Panel: Changes are displayed in two sections: “Staged” and “Unstaged”.
  • File Diff: View diff comparisons, supporting keyword search, path filtering, n/m line counts, and navigation via Enter / Shift+Enter.
  • Staged Commit: Uses the SVN changelist dsh-commit to manage files to be committed, ensuring that only staged files are submitted during the commit process.
  • Common Maintenance: Supports svn update, reverting individual file modifications, and adding unversioned files.
  • Ignore Rules: Reads and writes the svn:ignore property for the current directory; rules are non-recursive.
  • Commit History: Loads paginated data and displays the list of changed files.
  • Conflict Resolution: Provides quick resolution buttons for files with conflicts.
  • Graceful Fault Tolerance: Displays an svn-missing prompt if the system lacks svn; the panel component includes an ErrorBoundary to display a placeholder instead of leaving the entire panel blank when rendering errors occur.

Installation and Activation

First, confirm the prerequisites:

  1. dsh-better-sidebar >=0.12.0 is installed
  2. The system has the svn command-line tool installed (version 1.7+)
  3. Node environment meets >=20

The installation commands are as follows:

cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add git+https://github.com/ztyhehe/dsh-better-sidebar-svn.git

This command consists of two steps: first adding dsh-better-sidebar, and then adding this plugin. The build artifact lib/ has been committed to the repository, so no local build toolchain is required when installing via git.

After installation, perform a hard refresh of the browser (Cmd/Ctrl+Shift+R), and the “SVN” tab will appear in the sidebar.

If you need to remove it later:

cd ~/.dsh && dsh plugin --profile web remove dsh-better-sidebar-svn

Typical Usage

Following the steps above, you can use it in the sidebar as follows:

  1. Open the “SVN” tab to view the working copy status.
  2. Add or remove files from the “To Commit” list in the status panel.
  3. Click on a file to view the Diff; for navigation, you can use keyword search, path filtering, and Enter / Shift+Enter to jump up and down.
  4. Execute the commit after confirming the staged list; the commit will only affect the staged files.
  5. Use svn update to sync with the remote repository; execute revert if you need to restore a single file modification.
  6. If certain local files should not be under version control, you can maintain the svn:ignore of the current directory in the ignore rules.
  7. View commit history in the history tab and check the list of files changed in each commit.

SVN commands are uniformly executed with the --non-interactive --no-auth-cache parameters and output results in --xml format for easy program parsing.

Suitable Scenarios and Notes

It is suitable for scenarios where you are already using the DSH web sidebar and your project contains an SVN working copy. It concentrates common SVN operations into the sidebar, making it convenient to view status, diffs, history, and changed files directly in the browser.

Please note the following points:

  • svn log requires access to the repository server and may involve network round-trips; the server-side cache TTL is 1 hour.
  • Ignore rules only apply to the current directory and do not recurse into subdirectories.
  • The plugin runs with the permissions of the current DSH process; you should check the source code, dependencies, and license before installing.
  • The DSH community directory is an independent site with no official affiliation with DeepSeek or 幻方; it should not be understood as an official app store.

Resources

  • Directory Page: https://www.skillhub.cn/plugins/ztyhehe/dsh-better-sidebar-svn
  • GitHub: https://github.com/ztyhehe/dsh-better-sidebar-svn