问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

svn如何设置svn:ignore

发布网友 发布时间:2022-04-24 06:28

我来回答

1个回答

热心网友 时间:2022-04-10 15:10

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

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

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

复制代码
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 mole 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了!
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
酒驾缓刑节保证书怎么写 合同法律咨询免费 这款充电宝可以带上飞机吗? 倪俊卿成就及荣誉 江苏种牛站有几家? 山东宏正牧业有限公司服务承诺 吃早餐后抽血会影响体检结果吗 电脑如何设置护眼模式(台式电脑如何设置护眼模式) 电脑显示器设置护眼电脑屏幕怎么设置比较护眼 广告机是否支持分屏显示功能? 请教SVN服务器的问题 svn is not a working copy 怎么解决 sqlite数据库打不开unable to open database file,该怎么解决 AnkhSVN是做什么的 到底怎么用?还有旗舰版的vc2010真的有2.5g??如何破解啊? 编译器出现The target out of date是什么原因 Commit failed (details follow): File '/Users/Leejay/Desktop/boyue-iOS/.git/index' is out of date 如何把ios代码放在svn服务器 Item is out of date svn: Item '/wyb/wyb/WebRoot/WEB-INF/res/site/wedding/edi 使用SVN提交文件时,报错! 请教svn file out of date的解决办法 svn删除目录后提交显示Item 'XXXX' is out of date解决方法 svn总提示out of date,是怎么回事? 漫展cos什么好 潋玉缘的COS记录 北京有专卖地狱少女周边的店吗?哪里可以买到地狱少女全集的DVD9或者蓝光? 麒麟君的coser麒麟君 农保卡可以在异地医院直接使用吗 女173cm 59公斤的样子 胖吗 能不能cos男性的角色? 农保医保卡异地激活 我扬州中学新高一的,请问一定要入社团吗?推荐几个好的吧。。 svnkit is not a working copy 怎么解决 python如何获取svn路径是文件还是文件夹 孩子上户口超过三个月会罚款多少 如何将SVN的版本库通过git导出代码 SVN 代码提交时处错误。出了如下的错误,怎么解决? 小孩三岁上户口晚了罚款吗 孩子上户口超过三个月会罚款多少啊 孩子出生三年了还没上户口会罚款吗? 新生儿上户口超过期限是要罚款吗 宝宝上户口迟了会被罚款吗? 新生儿上户口延迟一年多需要罚款吗 小孩晚两年办户口会不会罚钱 孩子必须三个月之内上户口吗?不然就会罚款吗 深圳新生儿上户口,有时间限制吗? 最晚多长时间?超期的罚款是多少? 办户口晚要罚款吗 晚上户口需要罚款吗? 老街冰棍儿化了之后可以做什么? 一堆冰棍融化了怎么办?能做成其他什么东西吗?或者掺在一起做成桶装的? 雪糕化啦可以在动成原来的样子吗? 雪糕化掉能蒸馍头吗?