当前位置: 首页 > 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.rkmt.cn/news/1504618.html

相关文章:

  • 3分钟搞定:在Linux系统上安装官方级哔哩哔哩客户端完整指南
  • 实战指南:深度解析Mastodon iOS小组件的完整开发架构与实现方案
  • 别再自己扛私钥了!用SM2协同签名在Java/Go里实现密钥分片实战
  • T站的3D打印模型时代,结束了!
  • C#五子棋局域网对战源码(含服务端+客户端)及CSDN内容删除异常说明
  • PCA9601 I2C总线缓冲器:解决长距离、多设备通信难题
  • 周一开盘金价暴涨!济南想卖高价的,抓紧了! - 开心测评
  • 告别数据线:用XShell与Termux构建移动SSH工作站
  • QuickBMS终极指南:如何用脚本引擎快速破解游戏资源格式
  • 用STM32中断实现按键防抖与长按短按识别:一个工程搞定两种需求
  • 2026年贵阳骨干刑事律师最新推荐--张钦云律师本地案例丰富 - 速递信息
  • Layui-Admin:3个颠覆性设计,让后台系统开发效率提升300%
  • PCA9956B LED驱动芯片:24通道恒流控制与I2C接口详解
  • 机器学习木马检测算法优化与因果推断实践
  • Topit窗口置顶工具:重新定义你的多任务工作流,立即体验!
  • 如何高效使用智能钓鱼助手:FF14渔人的直感终极教程
  • 2026年杭州黄金回收交易指南:5家正规机构实地测评 - 奢侈品回收评测
  • P89LPC93x1 ADC实战:从架构解析到精度优化与模式选型
  • C#调用ResNet50v2 ONNX模型做图像分类,支持CUDA 10.2 GPU加速
  • 商用车车联网:认知篇 - 第6篇:商用车车联网的数据资产地图
  • 手把手教学:用AWS SageMaker Canvas快速验证供应链AI想法,避开模型训练的坑
  • okbiye AI 毕业论文写作:一站式科研文稿撰写利器,告别熬夜改稿难题
  • VC6+OpenCV1.0实现MFC图像加载与BMP/JPEG保存的完整工程包
  • 2026磁翻板液位计价格全解析:国产品牌技术实力与市场格局深度对比 - 水质仪表品牌排行榜
  • 微信群投票怎么发起?海投票轻量表决 vs 正式评选双方案 - 微信投票小程序
  • 终极Windows音频管理方案:如何用AudioSwitch一键切换音频设备
  • SteamShutdown终极指南:如何让Steam下载完成后自动关闭电脑
  • MPC7457/7447特定型号规格变更解析:从1.1V核心电压到宽温设计的工程实践
  • 2026年北京有害生物防制服务深度横评:从科学防治到合规选型的完整指南 - 优质企业观察收录
  • 换手机后Google Authenticator验证码全没了?这份自救指南请收好