新浦京81707con > 功能介绍 > CentOS 6.5安装SVN 客户端TortoiseSVN

原标题:CentOS 6.5安装SVN 客户端TortoiseSVN

浏览次数:74 时间:2019-12-22

CentOS 6.5安装SVN 客户端TortoiseSVN

TortoiseSVN简介:

TortoiseSVN 是 Subversion 版本调节系统的二个无需付费开源顾客端,能够超越时间的管理文件和目录。文件保留在大旨版本库,除了能记住文件和目录的历次修正以外,版本库特别像普通的文件服务器。你可以将文件恢复生机到过去的本子,何况能够透过检查历史知道数据做了怎么改良,何人做的改造。那正是干什么许多少人将 Subversion 和版本调控系统作为风华正茂种“时间机器”。

条件表达:

系统版本:CentOS 6.5,内核(uname -r):2.6.32-431.el6.x86_64

设置命令:

yum install -y subversion

SVN客商端命令:

翻看svn命令扶持:

svn help

查看子命令扶持:

svn checkout --help

checkout (co): Check out a working copy from a repository.
usage: checkout URL[@REV]... [PATH]

  If specified, REV determines in which revision the URL is first
  looked up.

  If PATH is omitted, the basename of the URL will be used as
  the destination. If multiple URLs are given each will be checked
  out into a sub-directory of PATH, with the name of the sub-directory
  being the basename of the URL.

  If --force is used, unversioned obstructing paths in the working
  copy destination do not automatically cause the check out to fail.
  If the obstructing path is the same type (file or directory) as the
  corresponding path in the repository it becomes versioned but its
  contents are left 'as-is' in the working copy.  This means that an
  obstructing directory's unversioned children may also obstruct and
  become versioned.  For files, any content differences between the
  obstruction and the repository are treated like a local modification
  to the working copy.  All properties from the repository are applied
  to the obstructing path.

  See also 'svn help update' for a list of possible characters
  reporting the action taken.

Valid options:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                            A revision argument can be one of:
                                NUMBER      revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'      latest in repository
                                'BASE'      base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'      revision just before COMMITTED
  -q [--quiet]            : print nothing, or only summary information
  -N [--non-recursive]    : obsolete; try --depth=files or --depth=immediates
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  --force                  : force operation to run
  --ignore-externals      : ignore externals definitions

Global options:
  --username ARG          : specify a username ARG
  --password ARG          : specify a password ARG
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting
  --trust-server-cert      : accept unknown SSL server certificates without
                            prompting (but only with '--non-interactive')
  --config-dir ARG        : read user configuration files from directory ARG
  --config-option ARG      : set user configuration option in the format:
                                FILE:SECTION:OPTION=[VALUE]
                            For example:
                                servers:global:http-library=serf

svn list --help

list (ls): List directory entries in the repository.
usage: list [TARGET[@REV]...]

  List each TARGET file and the contents of each TARGET directory as
  they exist in the repository.  If TARGET is a working copy path, the
  corresponding repository URL will be used. If specified, REV determines
  in which revision the target is first looked up.

  The default TARGET is '.', meaning the repository URL of the current
  working directory.

  With --verbose, the following fields will be shown for each item:

    Revision number of the last commit
    Author of the last commit
    If locked, the letter 'O'.  (Use 'svn info URL' to see details)
    Size (in bytes)
    Date and time of the last commit

Valid options:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                            A revision argument can be one of:
                                NUMBER      revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'      latest in repository
                                'BASE'      base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'      revision just before COMMITTED
  -v [--verbose]          : print extra information
  -R [--recursive]        : descend recursively, same as --depth=infinity
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  --incremental            : give output suitable for concatenation
  --xml                    : output in XML

Global options:
  --username ARG          : specify a username ARG
  --password ARG          : specify a password ARG
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting
  --trust-server-cert      : accept unknown SSL server certificates without
                            prompting (but only with '--non-interactive')
  --config-dir ARG        : read user configuration files from directory ARG
  --config-option ARG      : set user configuration option in the format:
                                FILE:SECTION:OPTION=[VALUE]
                            For example:
                                servers:global:http-library=serf

svn list使用示例:

svn list svn://192.168.231.1/SVNHome

相遇一而再超时的不当:

图片 1

查阅连接的IP上是或不是已经起步SVN服务,检查防火墙端口开放情况。

息灭接入难点今后,会唤起输入“root”顾客的密码,如下图:

图片 2

此间运用其余顾客访谈,直接回车就能够了,然后提醒输入客户名,输入完结回车,

下一场提示输入密码,输入完成回车,若是输入准确就足以见见相似的音信了。

svn checkout使用示例:

先创设二个目录,举个例子:mkdir test

检出到test目录下

svn checkout svn://192.168.231.1/SVNHome ./test

是因为事前曾经筛选保存密码了,所以这里不再需求证实,输出如下图:

图片 3

Checked out revision 10.检出成功,去test目录下看看吧。

改革版本库:

切换目录到从前检出的文件目录,然后实行命令:svn update

若果之前未曾选择保存密码,则会唤起输入检出时采纳的客商的密码!

设若需求动用别的客商,则直接按回车,那样就能够指示您输入客户名,输入客户名未来按回车,会唤醒输入密码,输入正确并且客户有权力的话,就能够伊始更新了。

Example Session: (Assumes that the repository has already been created. For Subversion repository creation and Subversion server configuration, see the (YoLinux Subversion and Trac tutorial) Checkout: svn checkout Go to source code directory: cd Project1/src Edit files: vi file1.cpp vi file2.cpp Verify and test: make We are ready to check-in the files into the Subversion repository. Check repository and report on new revisions and changes others have checked in: svn status -u . After many long hours or days of editing and work, get updates others have made: svn update U file.h C file1.cpp G file2.cpp ? a.out You will see: U: File was updated with a newer version checked-in since your checkout. G: Automatically merged with no conflicts. C: Not merged due to conflicts. You made changes to the same section of code as the update made by someone else since your checkout. For each "conflicted" file there will be three new local files generated by "update": file1.cpp.mine (File - post editing) file1.cpp.rold (BASE - pre editing) file1.cpp.rnew (HEAD - Updated file from repository) The file file1.cpp still exists but with svn conflict marker strings added in the file. At this point, a check-in will fail until the merge is resolved. Merge options: Edit the file file1.cpp Text markers are placed in the file to show the conflicts between the "HEAD" and "mine" versions. OR tkdiff -conflict file1.cpp OR Use a GUI merge tool: kdiff3 file1.cpp.mine file1.cpp.rnew -o file1.cpp OR Throw out your changes/abort: svn revert file1.cpp No resolve or check-in necessary if file is reverted. Verify and test, again: make Notify Subversion that conflicts have been resolved: svn resolved file1.cpp Note: This also removes the temporary files ".mine" and ".r###". Check-in to Subversion repository: svn ci -m "Add comments here" file1.cpp Subversion Peg revisions: Peg revisions are used so Subversion can find a previous version of a resource (file or directory) if its' location was different than it is now. Peg revisions are that extra hint Subversion needs to clear up ambiguity. $ svn command -r OPERATIVE-REV item@PEG-REV The default peg revision is BASE for working copy items and HEAD for repository URLs. When no operative revision is provided, it defaults to being the same revision as the peg revision. The PEG-REV is specified if the resource (file/directory) in question use to appear in a directory which is no longer in the same place or no longer exists. The "peg-revision" must be specified so subversion can look at the directory in that revision so it can find the resource. If a peg revision is specified without an operative revision, then the operative revision is assumed to be the same as the peg revision. For more see: Subversion Properties: Files under revision control can include Subversion keywords which properties can be set with the "propset" command. Keywords are substituted with the Subversion properties and will not appear in the file until a commit is performed. Other properties are used to modify the behavior of Subversion. The following properties can be set on entities stored in Subversion: Property Description svn:ignore A newline separated list of file patterns to ignore. List of files/directories to be ignored by svn status svn:keywords Valid RCS style keywords are: HeadURL - The URL for the head version of the object. Also: $URL$ LastChangedBy - The last person to modify the file. Also: $Author$ LastChangedDate - The date/time the object was last modified. Will appear as: $LastChangedDate: 2005-07-22 22:02:37 -0700 (Fri, 22 Jul 2005) $ Also: $Date$ LastChangedRevision - Describes the last known revision. Will appear as: $LastChangedRevision: XXX $ where "XXX" is the revision number. Also: $Rev$, Revision $Id$ - A compressed summary of the previous 4 keywords. Example RCS style comment Example Output /* $URL$ $Rev$ $Author$ $Date$ $Id$ */ /* $URL: $ $ Rev:2 $ $ Author:Greg $ $ Date:2006-10-12 14:31:84 -0400 (Thu,12 Oct 2006)$ $ Id:file.cpp 3 2006-10-12 18:31:84Z Greg $ */ To turn on keyword processing for $URL$ and $Rev$ set the property svn:keywords and commit the file. The property is not assigned until a commit is performed. Subsequent check-outs and updates will have substitution performed on the working file: svn propset svn:keywords "URL Rev" source-file.cpp To turn this substitution off so that one can edit the original keywords. This also requires a check-in: svn propdel svn:keywords source-file.cpp svn:executable Ensure file attribute is executable. Possible values: ON, OFF Example: svn propset svn:executable ON app.exe svn:eol-style One of 'native', 'LF', 'CR', 'CRLF'. Specify and maintain specified line ending for text file. LF: Unix, Linux, standards based OS, proprietary legacy systems, etc. CRLF: DOS and Microsoft OSs CR: Response input scripts, etc Example: find ./ -name "*.h" -exec svn propset svn:eol-style LF {} ; svn:mime-type The mime type of the file: text/html text/css text/plain image/jpeg ... See file /etc/mime.types for a list of mime types. Examples: svn propset svn:mime-type text/plain file.cpp svn propset svn:mime-type text/html file.html Web pages rendered from subversion will display as HTML source rather than as a web page unless this mime type is applied. svn:needs-lock Prevents conflicts for files which can not be contextually merged. i.e. photos, binaries, object libraries. svn:externals List of files or directories pointed to. Locate repository where directory specified should be retrieved. The directive propset is not required: svn propedit svn:externals local-target-dir local-target-dir local-target-dir/subdir -r### svn update svn commit svn propget svn:externals ./ The property applies to the directory. Subversion can not list or web browse svn:externals. Check-out ("co"), "export" and "log" can be performed. Must set environment variable "EDITOR", "SVN_EDITOR", "VISUAL" or set the Subversion configuration file (~/.subversion/config) attribute editor-cmd. i.e.: export EDITOR=vi Note: Subversion 1.6 introduces file externals in addition to directory externals. The files however must reside in the same repository. Also, the file must point to a location which exists in your local working directory. [Potential Pitfall]: Apply svn externals to directories and not files. (version 1.4) [Potential Pitfall]: If generating a tag (branch), one should assign the revision number to the external link to truly snapshot the repository for that tag. This revision number should be specified in the tagged branch version of the svn external. [Potential Pitfall]: The revision numbers shown by svn info will reflect the version numbers of the repository in which the files are stored. If the files are imported via an svn external directory, the revision numbers will reflect that of the external repository which the external points to and thus from where the files were imported.

--------------------------------------分割线

Linux中Subversion配置实例

CentOS 6.2 SVN搭建 (YUM安装)

CentOS 6.5部署Apache SVN 

Apache SVN搭建SVN服务器

Windows下SVN服务器搭建和选取 客户端重新安装密码

Ubuntu Server 12.04 安装 SVN 并迁移 Virtual SVN数据

Ubuntu Server搭建svn服务以至搬迁方法

借助网盘搭建SVN服务器

本文由新浦京81707con发布于功能介绍,转载请注明出处:CentOS 6.5安装SVN 客户端TortoiseSVN

关键词: 新浦京81707con

上一篇:js_脚本之家,vue组件生命周期详解_vue

下一篇:没有了