SVN全局配置文件更改实现自动Keywords填充

场景:

服务器A:远端服务器,存储项目文件夹和项目文件夹SVN仓库

用户终端A:用户终端

利用用户终端A的Powershell远程连接服务器A,操作服务器A上的SVN二进制文件,对服务器A上的项目文件夹进行版本控制操作。

首先将SVN二进制文件置于远端服务器,并将其路径设置为系统环境变量,

在使用SVN二进制程序时,svn.exe会在首次运行时,在用户目录C:\Users\当前用户\AppData\Roaming中创建subversion文件夹,里面是svn的一些配置文件。

如果需要实现对.txt文件自动Keywords填充需要对config文件进行更改

更改内容如下:

找到[miscellany] 下的

“# enable-auto-props = no”去掉前面的“#”,并将no改为yes

找到[auto-props]下的“# *.txt = svn:eol-style=native;svn:keywords=Author Date Id Rev URL;”去掉“#”

注意每条配置前不要留空格,不然svn无法读取配置,会报错。

重点来了:以上是用户级别的设置,如果是全局设置呢?

全局设置:

将刚才更改过config的subversion文件夹复制到C:\ProgramData下,即可在此站点对所有用户生效。

配置文件件如下:

[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
#   *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db
### Set log-encoding to the default encoding for log messages
# log-encoding = latin1
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
# use-commit-times = yes
### Set no-unlock to prevent 'svn commit' from automatically
### releasing locks on files.
# no-unlock = yes
### Set mime-types-file to a MIME type registry file, used to
### provide hints to Subversion's MIME type auto-detection
### algorithm.
# mime-types-file = /path/to/mime.types
### Set preserved-conflict-file-exts to a whitespace-delimited
### list of patterns matching file extensions which should be
### preserved in generated conflict file names.  By default,
### conflict files use custom extensions.
# preserved-conflict-file-exts = doc ppt xls od?
### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes
### Set interactive-conflicts to 'no' to disable interactive
### conflict resolution prompting.  It defaults to 'yes'.
# interactive-conflicts = no
### Set memory-cache-size to define the size of the memory cache
### used by the client when accessing a FSFS repository via
### ra_local (the file:// scheme). The value represents the number
### of MB used by the cache.
# memory-cache-size = 16
### Set diff-ignore-content-type to 'yes' to cause 'svn diff' to
### attempt to show differences of all modified files regardless
### of their MIME content type.  By default, Subversion will only
### attempt to show differences for files believed to have human-
### readable (non-binary) content.  This option is especially
### useful when Subversion is configured (via the 'diff-cmd'
### option) to employ an external differencing tool which is able
### to show meaningful differences for binary file formats.  [New
### in 1.9]
# diff-ignore-content-type = no

### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match (case-insensitively) will be
### applied to the file.  Note that auto-props functionality
### must be enabled, which is typically done by setting the
### 'enable-auto-props' option.
# *.c = svn:eol-style=native
# *.cpp = svn:eol-style=native
# *.h = svn:keywords=Author Date Id Rev URL;svn:eol-style=native
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
# *.sh = svn:eol-style=native;svn:executable
*.txt = svn:eol-style=native;svn:keywords=Author Date Id Rev URL;
# *.png = svn:mime-type=image/png
# *.jpg = svn:mime-type=image/jpeg
# Makefile = svn:eol-style=native

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

KevinDooooo

如果有帮助,您可请作者喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值