页首Html代码

返回顶部

svn之svn:ignore命令行设置

svn help 中有 propset propget propdel proplist propedit五个关于prop,也就是svn属性的设置。

在当前的svn工作拷贝下,svn status有些文件总是提示? 很烦人,所以希望通过设置svn:ignore来避免这种无聊的提示,试了几下命令,不行,还是看看 svn help propedit吧,终于弄懂了。

一下是svn的这个帮助信息:

View Code
propset (pset, ps): Set the value of a property on files, dirs, or revisions.
usage: 1. propset PROPNAME PROPVAL PATH...
2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]

1. Changes a versioned file or directory property in a working copy.
2. Changes an unversioned property on a repository revision.
(TARGET only determines which repository to access.)

The value may be provided with the --file option instead of PROPVAL.

Note: svn recognizes the following special versioned properties
but will store any arbitrary properties set:
svn:ignore - A newline separated list of file glob patterns to ignore.
svn:keywords - Keywords to be expanded. Valid keywords are:
URL, HeadURL - The URL for the head version of the object.
Author, LastChangedBy - The last person to modify the file.
Date, LastChangedDate - The date/time the object was last modified.
Rev, Revision, - The last revision the object changed.
LastChangedRevision
Id - A compressed summary of the previous
4 keywords.
Header - Similar to Id but includes the full URL.
svn:executable - If present, make the file executable. Use
'svn propdel svn:executable PATH...' to clear.
svn:eol-style - One of 'native', 'LF', 'CR', 'CRLF'.
svn:mime-type - The mimetype of the file. Used to determine
whether to merge the file, and how to serve it from Apache.
A mimetype beginning with 'text/' (or an absent mimetype) is
treated as text. Anything else is treated as binary.
svn:externals - A newline separated list of module specifiers,
each of which consists of a URL and a relative directory path,
similar to the syntax of the 'svn checkout' command:
http://example.com/repos/zig foo/bar
A revision to check out can optionally be specified to pin the
external to a known revision:
-r25 http://example.com/repos/zig foo/bar
To unambiguously identify an element at a path which has been
deleted (possibly even deleted multiple times in its history),
an optional peg revision can be appended to the URL:
-r25 http://example.com/repos/zig@42 foo/bar
Relative URLs are indicated by starting the URL with one
of the following strings:
../ to the parent directory of the extracted external
^/ to the repository root
// to the scheme
/ to the server root
The ambiguous format 'relative_path relative_path' is taken as
'relative_url relative_path' with peg revision support.
Lines in externals definitions starting with the '#' character
are considered comments and are ignored.
Subversion 1.4 and earlier only support the following formats
where peg revisions can only be specified using a -r modifier
and where URLs cannot be relative:
foo http://example.com/repos/zig
foo/bar -r 1234 http://example.com/repos/zag
Use of these formats is discouraged. They should only be used if
interoperability with 1.4 clients is desired.
svn:needs-lock - If present, indicates that the file should be locked
before it is modified. Makes the working copy file read-only
when it is not locked. Use 'svn propdel svn:needs-lock PATH...'
to clear.

The svn:keywords, svn:executable, svn:eol-style, svn:mime-type and
svn:needs-lock properties cannot be set on a directory. A non-recursive
attempt will fail, and a recursive attempt will set the property
only on the file children of the directory.

有效选项:
-F [--file] ARG : 从文件 ARG 读取属性值
--encoding ARG : 将ARG的值视为字符编码
-q [--quiet] : 不打印信息,或只打印概要信息
-r [--revision] ARG : ARG (一些命令也接受ARG1:ARG2范围)
版本参数可以是如下之一:
NUMBER 版本号
'{' DATE '}' 在指定时间以后的版本
'HEAD' 版本库中的最新版本
'BASE' 工作副本的基线版本
'COMMITTED' 最后提交或基线之前
'PREV' COMMITTED的前一版本
--targets ARG : 传递文件 ARG 内容为附件参数
-R [--recursive] : 向下递归,与 --depth=infinity 相同
--depth ARG : 限制操作深度是 ARG ('empty', 'files',
'immediates', 或 'infinity')
--revprop : 在版本属性上操作(使用-r参数)
--force : 强制操作运行
--changelist [--cl] ARG : 只能对修改列表 ARG 的成员操作

全局选项:
--username ARG : 指定用户名称 ARG
--password ARG : 指定密码 ARG
--no-auth-cache : 不要缓存用户认证令牌
--non-interactive : 不要交互提示
--trust-server-cert : accept SSL server certificates from unknown
certificate authorities without prompting (but only
with '--non-interactive')
--config-dir ARG : 从目录 ARG 读取用户配置文件
--config-option ARG : 以下属格式设置用户配置选项:
FILE:SECTION:OPTION=[VALUE]
例如:
servers:global:http-library=serf
ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn propset  svn:ignore "*.class
*.o
*.out
.gdbinit
.cproject
.project
" .
设置属性 “svn:ignore” 于 “.”


ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn plist
“.” 上的属性:
svn:ignore
svn:mergeinfo


ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn pget svn:ignore
*.class
*.o
*.out
.gdbinit
.cproject
.project


开始我自己尝试的时候 由于没有加上路径. 以为默认会有这个呢。。总提示错误,也不提示具体错误,直接让看help。后来加了. 路径 就OK了!


 

posted @ 2012-03-16 11:50  ayanmw  阅读(40312)  评论(2编辑  收藏  举报

页脚Html代码