![Subversion:错误的全局忽略/无法看到 mime 类型](https://linux22.com/image/608530/Subversion%EF%BC%9A%E9%94%99%E8%AF%AF%E7%9A%84%E5%85%A8%E5%B1%80%E5%BF%BD%E7%95%A5%2F%E6%97%A0%E6%B3%95%E7%9C%8B%E5%88%B0%20mime%20%E7%B1%BB%E5%9E%8B.png)
我目前正在服务器上测试 Subversion。如您在下面的配置文件中看到的,我进行了以下编辑:
A:我添加了全局忽略:
global-ignores = *thumb.db *.tmp
乙:我启用了自动道具并添加了一些扩展以设置为特定的 mime 类型:
enable-auto-props = yes
*.rtf = svn:mime-type=application/rtf
...
* = svn:mime-type=application/octet-stream
正如您所看到的,除了已定义的之外,我想要所有二进制内容。
我的问题
A:在 Tortoise 中它显示了以下内容:
但是我没有定义这些全局忽略!我怎样才能让它从我的配置文件中读取它们?
当我点击“编辑”时,它会打开我的配置文件。
乙:当我想检查 MIME 类型时,它没有显示任何内容:
G:\csmdepot_newtags_edited_config\csmdepot>svn proplist
CSMVersion.iniG:\csmdepot_newtags_edited_config\csmdepot>
Tortoise 也发生了同样的事情,它没有显示任何属性:
我该怎么做才能查看我的文件的 MIME 类型?
这是我的配置文件:
### This file configures various client-side behaviors.
###
### The commented-out examples below are intended to demonstrate
### how to use this file.
### Section for authentication and authorization customizations.
[auth]
### Set password stores used by Subversion. They should be
### delimited by spaces or commas. The order of values determines
### the order in which password stores are used.
### Valid password stores:
### gnome-keyring (Unix-like systems)
### kwallet (Unix-like systems)
### keychain (Mac OS X)
### windows-cryptoapi (Windows)
# password-stores = windows-cryptoapi
### To disable all password stores, use an empty list:
# password-stores =
###
### The rest of the [auth] section in this file has been deprecated.
### Both 'store-passwords' and 'store-auth-creds' can now be
### specified in the 'servers' file in your config directory
### and are documented there. Anything specified in this section
### is overridden by settings specified in the 'servers' file.
# store-passwords = no
# store-auth-creds = no
### Section for configuring external helper applications.
[helpers]
### Set editor-cmd to the command used to invoke your text editor.
### This will override the environment variables that Subversion
### examines by default to find this information ($EDITOR,
### et al).
# editor-cmd = editor (vi, emacs, notepad, etc.)
### Set diff-cmd to the absolute path of your 'diff' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff implementation.
# diff-cmd = diff_program (diff, gdiff, etc.)
### Diff-extensions are arguments passed to an external diff
### program or to Subversion's internal diff implementation.
### Set diff-extensions to override the default arguments ('-u').
# diff-extensions = -u -p
### Set diff3-cmd to the absolute path of your 'diff3' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff3 implementation.
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
### Set diff3-has-program-arg to 'yes' if your 'diff3' program
### accepts the '--diff-program' option.
# diff3-has-program-arg = [yes | no]
### Set merge-tool-cmd to the command used to invoke your external
### merging tool of choice. Subversion will pass 5 arguments to
### the specified command: base theirs mine merged wcfile
# merge-tool-cmd = merge_command
### Section for configuring tunnel agents.
[tunnels]
### Configure svn protocol tunnel schemes here. By default, only
### the 'ssh' scheme is defined. You can define other schemes to
### be used with 'svn+scheme://hostname/path' URLs. A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined. The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces. The command will be invoked as:
### <command> <hostname> svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as <user>@<hostname>.) If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh -q
### If you wanted to define a new 'rsh' scheme, to be used with
### 'svn+rsh:' URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator. A single backslash will be treated as an
### escape for the following character.
### Section for configuring miscelleneous Subversion options.
[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 = *thumb.db *.tmp
# *.rej *~ #*# .#* .*.swp .DS_Store
### 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
### 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;
*.rtf = svn:mime-type=application/rtf
*.jpg = svn:mime-type=image/jpeg
*.png = svn:mime-type=image/png
*.gif = svn:mime-type=image/gif
*.xml = svn:mime-type=text/xml
*.html = svn:mime-type=text/html
*.txt = svn:mime-type=text/plain
*.ini = svn:mime-type=text/plain
*.vbs = svn:mime-type=text/plain
*.cmd = svn:mime-type=text/plain
*.bat = svn:mime-type=text/plain
*.ps1 = svn:mime-type=text/plain
*.wsf = svn:mime-type=text/plain
*.cfg = svn:mime-type=text/plain
*.inf = svn:mime-type=text/plain
*.config = svn:mime-type=text/plain
* = svn:mime-type=application/octet-stream
谢谢你!
答案1
你必须明白一些事情
- 当你改变任何事物在 %APPDATA\Subversion\config 中,你改变了Subversion 客户端与……互动所有和任何存储库和此主机的 svn 客户端,由此用户
- 这些更改是本地的,并且不会在服务器端复制|存储(在某种程度上),同一 repo 的不同客户端可能具有不同的(甚至不兼容的)设置
- TortoiseSVN 在系统默认设置之上有自己的附加设置,但是使用全局设置也
- Subversion 中的自动属性定义了额外的属性,这些属性将在第一次提交到仓库时添加到文件中(之后
svn add
),如果你想测试自动属性,你必须将任何文件提交到仓库中,这些文件必须应用这些属性并验证结果仅限相关文件(在您的情况下,如果您在 WC /我在命令中看不到目标/中使用 proplist,那么您必须在 ordfer 中使用 -R /recursive/ fkag 来列出树中的所有对象,目录本身不能有 mime 类型) - “*” 是无效的文件名模式(对于 Windows),因此您的 ini 没有重新定义 mime-type(尝试。,但我无法预测特殊定义的扩展的 mime/type)