安装好TortoiseSVN,安装过程可以全部默认,除了以下这步

如果svn已经安装完毕,这一步没有选择,可以不用重新安装,直接点击安装包,选择Modefy进行更改即可

安装插件svn,搜索svn,一般第一个就是,也可以根据作者来确定是哪个插件

把下面的配置都粘贴出来

配置setting.json文件

用户》扩展》svn》setting.json


根据自己的喜好,配置参数,svn.path参数是必须要配置的,配置自己安装的svn.exe
如:"svn.path": "C:\\d\\software\\dev\\TortoiseSVN\\bin\\svn.exe"
插件里面的配置不是即粘即用,有的两个参数之间少了逗号,有的value值需要修改
- {
- "security.workspace.trust.untrustedFiles": "open",
- "explorer.confirmDelete": false,
- // Whether auto refreshing is enabled
- "svn.autorefresh": false,
-
- // Select all files when commit changes
- "svn.commit.changes.selectedAll": true,
-
- // Check empty message before commit
- "svn.commit.checkEmptyMessage": true,
-
- // Set file to status resolved after fix conflicts
- "svn.conflicts.autoResolve": true,
-
- // Encoding of svn output if the output is not utf-8. When this parameter is null, the encoding is automatically detected. Example: 'windows-1252'.
- "svn.default.encoding": "utf-8",
-
- // The default location to checkout a svn repository.
- "svn.defaultCheckoutDirectory": "",
-
- // When a file is deleted, what SVN should do? `none` - Do nothing, `prompt` - Ask the action, `remove` - automatically remove from SVN
- "svn.delete.actionForDeletedFiles": "prompt", // values: ["none","prompt","remove"],
-
- // Ignored files/rules for `svn.delete.actionForDeletedFiles`(Ex.: file.txt or **/*.txt)
- "svn.delete.ignoredRulesForDeletedFiles": [],
-
- // Controls whether to automatically detect svn externals.
- "svn.detectExternals": true,
-
- // Controls whether to automatically detect svn on ignored folders.
- "svn.detectIgnored": true,
-
- // Show diff changes using latest revision in the repository. Set false to use latest revision in local folder
- "svn.diff.withHead": true,
-
- // Whether svn is enabled
- "svn.enabled": true,
-
- // Try the experimental encoding detection
- "svn.experimental.detect_encoding": false,
-
- // Priority of encoding
- "svn.experimental.encoding_priority": [],
-
- // Url for the gravitar icon using the
, and placeholders - "svn.gravatar.icon_url": "https://www.gravatar.com/avatar/
.jpg?s=&d=robohash" , -
- // Use garavatar icons in log viewers
- "svn.gravatars.enabled": true,
-
- // Ignores the warning when SVN is missing
- "svn.ignoreMissingSvnWarning": false,
-
- // List of SVN repositories to ignore.
- "svn.ignoreRepositories": [],
-
- // Ignores the warning when working copy is too old
- "svn.ignoreWorkingCopyIsTooOld": true,
-
- // Regex to detect path for 'branches' in SVN URL, 'null' to disable. Subpath use 'branches/[^/]+/([^/]+)(/.*)?' (Ex.: 'branches/...', 'versions/...')
- "svn.layout.branchesRegex": "branches/([^/]+)(/.*)?",
-
- // Regex group position for name of branch
- "svn.layout.branchesRegexName": 1,
-
- // Set true to show 'branches/
' and false to show only '' - "svn.layout.showFullName": true,
-
- // Regex group position for name of tag
- "svn.layout.tagRegexName": 1,
-
- // Regex to detect path for 'tags' in SVN URL, 'null' to disable. Subpath use 'tags/[^/]+/([^/]+)(/.*)?'. (Ex.: 'tags/...', 'stamps/...')
- "svn.layout.tagsRegex": "tags/([^/]+)(/.*)?",
-
- // Regex to detect path for 'trunk' in SVN URL, 'null' to disable. (Ex.: '(trunk)', '(main)')
- "svn.layout.trunkRegex": "(trunk)(/.*)?",
-
- // Regex group position for name of trunk
- "svn.layout.trunkRegexName": 1,
-
- // Number of commit messages to log
- "svn.log.length": 50,
-
- // Maximum depth to find subfolders using SVN
- "svn.multipleFolders.depth": 4,
-
- // Allow to find subfolders using SVN
- "svn.multipleFolders.enabled": true,
-
- // Folders to ignore using SVN
- "svn.multipleFolders.ignore": ["**/.git","**/.hg","**/vendor","**/node_modules"],
-
- // Path to the svn executable
- "svn.path": "C:\\d\\software\\dev\\TortoiseSVN\\bin\\svn.exe",
-
- // Only show previous commits for a given user. Requires svn >= 1.8
- "svn.previousCommitsUser": "",
-
- // Refresh remote changes on refresh command
- "svn.refresh.remoteChanges": true,
-
- // Set the interval in seconds to check changed files on remote repository and show in statusbar. 0 to disable
- "svn.remoteChanges.checkFrequency": 300,
-
- // Show the output window when the extension starts
- "svn.showOutput": true,
-
- // Show the update message when update is run
- "svn.showUpdateMessage": true,
-
- // Set left click functionality on changes resource state
- "svn.sourceControl.changesLeftClick": "open diff", // values: ["open","open diff"],
-
- // Combine the svn external in the main if is from the same server.
- "svn.sourceControl.combineExternalIfSameServer": false,
-
- // Allow to count unversioned files in status count
- "svn.sourceControl.countUnversioned": true,
-
- // Hide unversioned files in Source Control UI
- "svn.sourceControl.hideUnversioned": true,
-
- // Ignore unversioned files like .gitignore, Configuring this will overlook the default ignore rule
- "svn.sourceControl.ignore": [],
-
- // Changelists to ignore on commit
- "svn.sourceControl.ignoreOnCommit": ["ignore-on-commit"],
-
- // Changelists to ignore on status count
- "svn.sourceControl.ignoreOnStatusCount": ["ignore-on-commit"],
-
- // Set to ignore externals definitions on update (add --ignore-externals)
- "svn.update.ignoreExternals": true
-
- }
添加地址可以先把代码checkout下来,再添加本地文件目录至vs code里面,也可以直接添加svn地址

文件修改后,在左侧菜单源代码管理会列出改动的文件,可对文件进行提交等操作
