⑴ svn不小心ignore了怎么办
对于TortoiseSVN,可能版本会有区别,可尝试:右键文件夹\文件夹,选择菜单:TortoiseSVN->Removefromignorelist(从忽略列表中删除)或右键文件夹\文件夹,选择菜单:TortoiseSVN->Add(添加)以下操作要谨慎:右键文
⑵ linux 下的svn怎么设置忽略文件
在源代码工作目录下执行如下命令:
$ svn propedit svn:ignore .注意:请别漏掉最后的点(.表示当前目录)
打开的文件就是忽略列表文件了(默认是空的),每一行是一项。在该文件中逐行输入需要忽略掉的文件或目录正则表达式,例如:
*.obj
debug
release
⑶ 如何用命令行实现TortoiseSVN命令
TortoiseSVN是一个GUI客户端,这个自动化指导为你展示了让TortoiseSVN对话框显示并收集客户输入,如果你希望编写不需要输入的脚本,你应该使用官方的Subversion命令行客户端。
TortoiseSVN的GUI程序叫做TortoiseProc.exe。所有的命令通过参数/command:asdf指定,其中asdf是必须的命令名(命令名详见”表 1. 有效命令及选项列表“)。大多数此类命令至少需要一个路径参数,使用/path:"some\path"指定。在下面的命令表格中,命令引用的是/command:asdf参数,余下的代表了/path:"some\path"参数。
因为一些命令需要一个目标路径的列表(例如提交一些特定的文件),/path参数可以接收多个路径,使用*分割。
TortoiseSVN 使用临时文件在 shell 扩展和主程序之间传递多个参数。从 TortoiseSVN 1.5.0 开始,废弃/notempfile参数,不再需要增加此参数。
The progress dialog which is used for commits, updates and many more commands usually stays open after the command has finished until the user presses theOK button. This can be changed by checking the corresponding option in the settings dialog. But using that setting will close the progress dialog, no matter if you start the command from your batch file or from the TortoiseSVN context menu.
To specify a different location of the configuration file, use the parameter /configdir:"path\to\config\directory". This will override the default path, including any registry setting.
如果想在进度对话框执行完毕后自动关闭,而又不必设置永久性的参数,可以传递/closeonend参数。
/closeonend:0 不自动关闭对话框
/closeonend:1 如果没发生错误则自动关闭对话框
/closeonend:2 如果没发生错误和冲突则自动关闭对话框
/closeonend:3如果没有错误、冲突和合并,会自动关闭
下面的列表列出了所有可以使用TortoiseProc.exe访问的命令,就像上面的描述,必须使用/command:asdf的形式,在列表中,因为节省空间的关系省略了/command的前缀。
表 1. 有效命令及选项列表
命令
描述
:about 显示关于对话框。如果没有给命令也会显示。
:log 打开日志对话框,/path 指定了显示日志的文件或目录,另外还有三个选项可以设置: /startrev:xxx、/endrev:xxx和/strict
:checkout 打开检出对话框,/path指定了目标路径,而/url制定了检出的URL。
:import 打开导入对话框,/path 指定了数据导入路径。
:update 将工作副本的/path更新到HEAD,如果给定参数/rev,就会弹出一个对话框询问用户需要更新到哪个修订版本。为了防止指定修订版本号/rev:1234的对话框,需要选项/nonrecursive和/ignoreexternals。
:commit 打开提交对话框,/path 指定了目标路径或需要提交的文件列表,你也可以使用参数 /logmsg 给提交窗口传递预定义的日志信息,或者你不希望将日志传递给命令行,你也可以使用/logmsgfile:path,path 指向了保存日志信息的文件。为了预先填入bug的ID(如果你设置了集成bug追踪属性),你可以使用/bugid:"the bug id here"完成这个任务。
:add 将/path的文件添加到版本控制 。
:revert 恢复工作副本的本地修改,/path说明恢复哪些条目。
:cleanup 清理中断和终止的操作,将工作副本的/path解锁。
:resolve 将/path指定文件的冲突标示为解决,如果给定/noquestion,解决不会向用户确认操作。
:repocreate 在/path创建一个版本库。
:switch 打开选项对话框。/path 指定目标目录。
:export 将/path的工作副本导出到另一个目录,如果/path指向另一个未版本控制目录,对话框会询问要导出到/path的URL。
:merge Opens the merge dialog. The /path specifies the target directory. For merging a revision range, the following options are available: /fromurl:URL, /revrange:string. For merging two repository trees, the following options are available: /fromurl:URL, /tourl:URL, /fromrev:xxx and /torev:xxx. These pre-fill the relevant fields in the merge dialog.
:mergeall Opens the merge all dialog. The /path specifies the target directory.
: Brings up the branch/tag dialog. The /path is the working to branch/tag from. And the /url is the target URL. You can also specify the /logmsg switch to pass a predefined log message to the branch/tag dialog. Or, if you don't want to pass the log message on the command line, use /logmsgfile:path, where path points to a file containing the log message.
:settings 打开设置对话框。
:remove 从版本控制里移除/path中的文件。
:rename 重命名/path的文件,会在对话框中询问新文件,为了防止一个步骤中询问相似文件,传递/noquestion。
:diff Starts the external diff program specified in the TortoiseSVN settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is omitted, then the diff is done between the file in /path and its BASE. To explicitly set the revision numbers use /startrev:xxx and /endrev:xxx. If/blame is set and /path2 is not set, then the diff is done by first blaming the files with the given revisions.
:showcompare
Depending on the URLs and revisions to compare, this either shows a unified diff (if the option unified is set), a dialog with a list of files that have changed or if the URLs point to files starts the diff viewer for those two files.
The options url1, url2, revision1 and revision2 must be specified. The options pegrevision, ignoreancestry, blame and unified are optional.
:conflicteditor Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path.
:relocate 打开重定位对话框,/path指定了重定位的工作副本路径。
:help 打开帮助文件
:repostatus 打开为修改检出对话框,/path 指定了工作副本目录。
:repobrowser Starts the repository browser dialog, pointing to the URL of the working given in /path or /path points directly to an URL. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD. If /path points to an URL, the /projectpropertiespath:path/to/wcspecifies the path from where to read and use the project properties.
:ignore 将/path中的对象加入到忽略列表,也就是将这些文件添加到 svn:ignore 属性。
:blame
为 /path 选项指定的文件打开追溯对话框。
如果设置了 /startrev 和 /endrev 选项,不会显示询问追溯范围对话框,直接使用这些选项中的版本号。
如果设置了 /line:nnn 选项,TortoiseBlame 会显示指定行数。
也支持 /ignoreeol,/ignorespaces 和 /ignoreallspaces 选项。
:cat 将/path指定的工作副本或URL的文件保存到/savepath:path,修订版本号在/revision:xxx,这样可以得到特定修订版本的文件。
:createpatch 创建/path下的补丁文件。
:revisiongraph 显示/path目录下的版本变化图。
:lock Locks a file or all files in a directory given in /path. The 'lock' dialog is shown so the user can enter a comment for the lock.
:unlock Unlocks a file or all files in a directory given in /path.
:rebuildiconcache Rebuilds the windows icon cache. Only use this in case the windows icons are corrupted. A side effect of this (which can't be avoided) is that the icons on the desktop get rearranged. To suppress the message box, pass /noquestion.
:properties 显示 /path 给出的路径之属性对话框。
Examples (which should be entered on one line):
TortoiseProc.exe /command:commit
/path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"
/logmsg:"test log message" /closeonend:0
TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0
TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"
/startrev:50 /endrev:60 /closeonend:0
⑷ SVN添加忽略后,怎么解除被忽略的文件
如果用的客户端是TortoiseSVN,对这个文件夹点右键,选择右键菜单: TortoiseSVN——从忽略列表中删除,然后就可以了,很简单的。 如果显示锁定的话,你可以尝试对上层文件夹执行一次清理操作,右键菜单: TortoiseSVN——清理
⑸ svn忽略文件中,括号内有recursively与没有,有什么区别(如下图)
svn忽略文件中,括号内有recursively与没有,有什么区别?第一步:点击eclipse中的文件-->新建-->动态网页-->命名一个自己要建的项目名称(建设名字为project)。第二步:在第一步中新建的项目上右键-->导入-->现有项目到工作空间中-->选择需要导入的文件系统-->点击完成。导出过程第一步:在需要导出的项目上右键-->导出-->文件系统(假设导出到桌面上)第二步:将导出的文件系统文件中修改工程里面project这个文件。用记事本打开,修改一下<projectDescription>,<name>projectname</name>中的projectname改为需要导入的名字例如project,然后将整个导出的文件系统文件夹重命名为project,最后执行导入的过程。--------------开始填坑------------1、假如未执行步骤二,若果导入导出的项目在一个workspace中,会报某些项目因位于工作空间目录中而被隐藏的错误。2、使用eclipse进行项目开发,有的时候需要修改项目的名称,可是在eclipse中部署到tomcat中访问的时候仍然只能使用旧的项目名称进行访问。 比如原来项目的名称是test,现在我在eclipse中改成了newtest,可是Path仍然是test,这个时候只能通过http://localhost:8080/test进行访问。遇到这种情况,在你所部署项目的.settings目录下,找到名字为org.eclipse.wst.common.component的文件,文件是xml格式的。把其中所有涉及到原项目名称的地方都修改为你最新的项目名称。最后在eclipse中点击项目-->清理,重构一下项目即可。
⑹ svn如何设置svn:ignore
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 .
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 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了!
⑺ 项目与svn同步时发生错误怎么解决
需要对项目目录进行清理。
⑻ svn 命令 .svnignore 写法
function __construct($info=array()){
$this->host = $info['h'];
$this->name = $info['u'];
$this->pass = $info['pwd'];
$this->table = $info['dbname'];
$this->connect();
}