• vscode+svn的配置和简单使用


    1 安装TortoiseSVN

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

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

     2 配置vs code

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

     把下面的配置都粘贴出来

     配置setting.json文件

    用户》扩展》svn》setting.json

     

     根据自己的喜好,配置参数,svn.path参数是必须要配置的,配置自己安装的svn.exe

     如:"svn.path": "C:\\d\\software\\dev\\TortoiseSVN\\bin\\svn.exe"

    插件里面的配置不是即粘即用,有的两个参数之间少了逗号,有的value值需要修改

    1. {
    2. "security.workspace.trust.untrustedFiles": "open",
    3. "explorer.confirmDelete": false,
    4. // Whether auto refreshing is enabled
    5. "svn.autorefresh": false,
    6. // Select all files when commit changes
    7. "svn.commit.changes.selectedAll": true,
    8. // Check empty message before commit
    9. "svn.commit.checkEmptyMessage": true,
    10. // Set file to status resolved after fix conflicts
    11. "svn.conflicts.autoResolve": true,
    12. // Encoding of svn output if the output is not utf-8. When this parameter is null, the encoding is automatically detected. Example: 'windows-1252'.
    13. "svn.default.encoding": "utf-8",
    14. // The default location to checkout a svn repository.
    15. "svn.defaultCheckoutDirectory": "",
    16. // When a file is deleted, what SVN should do? `none` - Do nothing, `prompt` - Ask the action, `remove` - automatically remove from SVN
    17. "svn.delete.actionForDeletedFiles": "prompt", // values: ["none","prompt","remove"],
    18. // Ignored files/rules for `svn.delete.actionForDeletedFiles`(Ex.: file.txt or **/*.txt)
    19. "svn.delete.ignoredRulesForDeletedFiles": [],
    20. // Controls whether to automatically detect svn externals.
    21. "svn.detectExternals": true,
    22. // Controls whether to automatically detect svn on ignored folders.
    23. "svn.detectIgnored": true,
    24. // Show diff changes using latest revision in the repository. Set false to use latest revision in local folder
    25. "svn.diff.withHead": true,
    26. // Whether svn is enabled
    27. "svn.enabled": true,
    28. // Try the experimental encoding detection
    29. "svn.experimental.detect_encoding": false,
    30. // Priority of encoding
    31. "svn.experimental.encoding_priority": [],
    32. // Url for the gravitar icon using the , and placeholders
    33. "svn.gravatar.icon_url": "https://www.gravatar.com/avatar/.jpg?s=&d=robohash",
    34. // Use garavatar icons in log viewers
    35. "svn.gravatars.enabled": true,
    36. // Ignores the warning when SVN is missing
    37. "svn.ignoreMissingSvnWarning": false,
    38. // List of SVN repositories to ignore.
    39. "svn.ignoreRepositories": [],
    40. // Ignores the warning when working copy is too old
    41. "svn.ignoreWorkingCopyIsTooOld": true,
    42. // Regex to detect path for 'branches' in SVN URL, 'null' to disable. Subpath use 'branches/[^/]+/([^/]+)(/.*)?' (Ex.: 'branches/...', 'versions/...')
    43. "svn.layout.branchesRegex": "branches/([^/]+)(/.*)?",
    44. // Regex group position for name of branch
    45. "svn.layout.branchesRegexName": 1,
    46. // Set true to show 'branches/' and false to show only ''
    47. "svn.layout.showFullName": true,
    48. // Regex group position for name of tag
    49. "svn.layout.tagRegexName": 1,
    50. // Regex to detect path for 'tags' in SVN URL, 'null' to disable. Subpath use 'tags/[^/]+/([^/]+)(/.*)?'. (Ex.: 'tags/...', 'stamps/...')
    51. "svn.layout.tagsRegex": "tags/([^/]+)(/.*)?",
    52. // Regex to detect path for 'trunk' in SVN URL, 'null' to disable. (Ex.: '(trunk)', '(main)')
    53. "svn.layout.trunkRegex": "(trunk)(/.*)?",
    54. // Regex group position for name of trunk
    55. "svn.layout.trunkRegexName": 1,
    56. // Number of commit messages to log
    57. "svn.log.length": 50,
    58. // Maximum depth to find subfolders using SVN
    59. "svn.multipleFolders.depth": 4,
    60. // Allow to find subfolders using SVN
    61. "svn.multipleFolders.enabled": true,
    62. // Folders to ignore using SVN
    63. "svn.multipleFolders.ignore": ["**/.git","**/.hg","**/vendor","**/node_modules"],
    64. // Path to the svn executable
    65. "svn.path": "C:\\d\\software\\dev\\TortoiseSVN\\bin\\svn.exe",
    66. // Only show previous commits for a given user. Requires svn >= 1.8
    67. "svn.previousCommitsUser": "",
    68. // Refresh remote changes on refresh command
    69. "svn.refresh.remoteChanges": true,
    70. // Set the interval in seconds to check changed files on remote repository and show in statusbar. 0 to disable
    71. "svn.remoteChanges.checkFrequency": 300,
    72. // Show the output window when the extension starts
    73. "svn.showOutput": true,
    74. // Show the update message when update is run
    75. "svn.showUpdateMessage": true,
    76. // Set left click functionality on changes resource state
    77. "svn.sourceControl.changesLeftClick": "open diff", // values: ["open","open diff"],
    78. // Combine the svn external in the main if is from the same server.
    79. "svn.sourceControl.combineExternalIfSameServer": false,
    80. // Allow to count unversioned files in status count
    81. "svn.sourceControl.countUnversioned": true,
    82. // Hide unversioned files in Source Control UI
    83. "svn.sourceControl.hideUnversioned": true,
    84. // Ignore unversioned files like .gitignore, Configuring this will overlook the default ignore rule
    85. "svn.sourceControl.ignore": [],
    86. // Changelists to ignore on commit
    87. "svn.sourceControl.ignoreOnCommit": ["ignore-on-commit"],
    88. // Changelists to ignore on status count
    89. "svn.sourceControl.ignoreOnStatusCount": ["ignore-on-commit"],
    90. // Set to ignore externals definitions on update (add --ignore-externals)
    91. "svn.update.ignoreExternals": true
    92. }

     3 添加svn地址和更新代码

    添加地址可以先把代码checkout下来,再添加本地文件目录至vs code里面,也可以直接添加svn地址

     

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

  • 相关阅读:
    JNI开发必学C/C++基础
    SpringMvc中RequestMapping注解
    Materials Studio8.0
    预处理加速干货:大幅加速数据预处理、轻松定制高性能ML算子
    Vue3 生命周期
    最长有效括号的问题
    Docker 常用命令
    【动手学深度学习笔记】一.数据操作
    08-prometheus监控的告警通知-alertmanager组件工具
    记录关于Ajax二次加载出的内容无法再次实现Ajax点击效果问题
  • 原文地址:https://blog.csdn.net/guihui666666/article/details/126280980