当前位置: 首页 > news >正文

vscode+svn的配置和简单使用

vscode+svn的配置和简单使用

一、安装TortoiseSVN

  1. 运行安装包,绝大多数步骤保持默认安装即可,仅自定义组件页面为关键步骤

  2. 若已经装好TortoiseSVN、之前没勾选命令行工具,不用卸载重装
    直接双击原安装包,选择Modify模式补充安装组件

二、配置VS Code SVN插件

2.1 安装SVN扩展

打开VS Code扩展栏,搜索svn,选择匹配的官方SVN插件安装

2.2 打开settings.json配置文件

  1. 找到插件配置入口,打开配置编辑页
  2. 点击进入settings.json编辑界面
  3. 路径层级:用户 → 扩展 → svn → 在settings.json中编辑

2.3 填入完整配置代码

注意:svn.path为必填项,替换成你本地svn.exe真实路径;代码标点已补全,按需微调参数

{"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",// 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 <AUTHOR>, <AUTHOR_MD5> and <SIZE> placeholders"svn.gravatar.icon_url":"https://www.gravatar.com/avatar/<AUTHOR_MD5>.jpg?s=<SIZE>&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/<name>' and false to show only '<name>'"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",// 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}

三、添加SVN地址并拉取、管理代码

  1. 拉取代码两种方式:
  • 方式1:先用TortoiseSVN右键检出代码,再用VS Code打开本地项目文件夹
  • 方式2:直接在VS Code插件内填写SVN仓库地址拉取代码
  1. 日常代码操作
    文件修改完成后,左侧菜单栏源代码管理面板会自动展示所有改动文件,可执行提交、更新、对比差异等SVN操作。
http://www.jsqmd.com/news/992867/

相关文章:

  • Three.js 性能优化笔记:那个酷炫的魔法阵,我是如何让40个粒子丝滑运行的
  • 实战指南:深度解析Mastodon iOS小组件的完整开发架构与实现方案
  • 3分钟搞定:在Linux系统上安装官方级哔哩哔哩客户端完整指南
  • 【Vulhub实战】Nginx 配置缺陷与历史漏洞深度剖析
  • Pyfa:EVE Online玩家的终极离线配船工具完全指南 [特殊字符]
  • 告别系统束缚:跨平台iOS应用管理的终极解决方案
  • 从鸡尾酒会到算法:语音分离技术演进与实战解析
  • 从Vivado 2018.2到2023.1:老工程IP升级避坑指南与缓存机制深度解读
  • 别再自己扛私钥了!用SM2协同签名在Java/Go里实现密钥分片实战
  • T站的3D打印模型时代,结束了!
  • STM32中断配置避坑指南:从EXTI到NVIC,新手最容易忽略的5个细节
  • C#五子棋局域网对战源码(含服务端+客户端)及CSDN内容删除异常说明
  • 3分钟学会百度网盘秒传:永久分享文件的终极解决方案
  • 2026年降AIGC软件选购指南:三大类10款热门降AI率工具实测
  • 智慧树课程自动化终极指南:3大逆向工程突破实现高效学习
  • PCA9601 I2C总线缓冲器:解决长距离、多设备通信难题
  • 洛雪音乐音源配置全攻略:5分钟解锁全网无损音乐免费听
  • 周一开盘金价暴涨!济南想卖高价的,抓紧了! - 开心测评
  • MPC8572E PowerQUICC III处理器硬件设计全解析:从架构到PCB实战
  • 经典P8xC592芯片CAN控制器与UART集成开发实战指南
  • Pyfa:在EVE Online中打造完美飞船配置的终极指南
  • 别再为STC89C52烧录发愁了!手把手教你搞定USB转TTL的‘串口漏电’问题
  • HandyControl入门避坑指南
  • QuickBMS终极指南:如何用脚本引擎快速破解游戏资源格式
  • 开源硬件控制工具性能调校神器:G-Helper华硕笔记本深度技术解析与实战指南
  • 告别数据线:用XShell与Termux构建移动SSH工作站
  • 用STM32中断实现按键防抖与长按短按识别:一个工程搞定两种需求
  • I2C总线复用器PCA9547:解决地址冲突与总线负载的嵌入式设计利器
  • STM32F103用定时器输入捕获读HC-SR04回波时间,串口实时发距离数据
  • VC++轻量级开机启动工具:通过win.ini的load/run项实现自动运行