• Mac svn使用学习-1-简介


    在Windows环境中,可以使用TortoiseSVN来搭建svn环境。但是由于Mac自带了svn的服务器端和客户端功能,因此可以直接使用svn功能。

    svn即subversion,Subversion是一个自由开源的版本控制系统。在Subversion管理下,文件和目录可以超越时空。Subversion将文件存放在中心版本库里,这个版本库很像一个普通的文件服务器,不同的是,它可以记录每一次文件和目录的修改情况,这样就可以借此将数据恢复到以前的版本,并可以查看数据的更改细节。

    绝大多数开源软件都使用SVN作为代码版本管理软件

    Subversion的版本库的确是一种文件服务器,但不是“一般”的文件服务器。Subversion版本库的特别之处在于,它会记录每一次改变:每个文件的改变,甚至是目录树本身的改变,例如文件和目录的添加、删除和重新组织。
    一般情况下,客户端从版本库中获取的数据是文件系统树中的最新数据,但是客户端也具备查看文件系统树以前任何一个状态的能力。举个例子,客户端有时会对一些历史性问题感兴趣,比如“上星期三时的目录结构是什么样的?”或者“谁最后一个修改了这个文件,都修改了什么?”这些都是版本控制系统的核心问题(设计用来记录和跟踪数据变化的系统)。

    1.帮助

    1)svn help

    先查看帮助,看其提供了什么功能:

    userdeMBP:~ user$ svn help
    usage: svn <subcommand> [options] [args]
    Subversion command-line client.
    Type 'svn help <subcommand>' for help on a specific subcommand.
    Type 'svn --version' to see the program version and RA modules,
         'svn --version --verbose' to see dependency versions as well,
         'svn --version --quiet' to see just the version number.
    
    大多数子命令接受文件和/或目录参数,在目录上递归。如果没有为这样的命令提供参数,它将在默认情况下递归当前目录(包括当前目录)。
    
    Available subcommands:
       add
       auth
       blame (praise, annotate, ann)
       cat
       changelist (cl)
       checkout (co)
       cleanup
       commit (ci)
       copy (cp)
       delete (del, remove, rm)
       diff (di)
       export
       help (?, h)
       import
       info
       list (ls)
       lock
       log
       merge
       mergeinfo
       mkdir
       move (mv, rename, ren)
       patch
       propdel (pdel, pd)
       propedit (pedit, pe)
       propget (pget, pg)
       proplist (plist, pl)
       propset (pset, ps)
       relocate
       resolve
       resolved
       revert
       status (stat, st)
       switch (sw)
       unlock
       update (up)
       upgrade
       x-shelve (shelve)
       x-unshelve (unshelve)
       x-shelves (shelves)
    
    Subversion is a tool for version control.
    For additional information, see http://subversion.apache.org/

    2)svn --version:参见程序版本和RA模块

    userdeMBP:~ user$ svn --version
    svn, version 1.10.0 (r1827917)
       compiled Aug 14 2018, 02:37:13 on x86_64-apple-darwin17.0.0
    
    Copyright (C) 2018 The Apache Software Foundation.
    This software consists of contributions made by many people;
    see the NOTICE file for more information.
    Subversion is open source software, see http://subversion.apache.org/
    
    The following repository access (RA) modules are available:
    
    * ra_svn : Module for accessing a repository using the svn network protocol.
      - with Cyrus SASL authentication
      - handles 'svn' scheme
    * ra_local : Module for accessing a repository on local disk.
      - handles 'file' scheme
    * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      - using serf 1.3.9 (compiled with 1.3.9)
      - handles 'http' scheme
      - handles 'https' scheme
    
    The following authentication credential caches are available:
    
    * Plaintext cache in /Users/user/.subversion
    * GPG-Agent
    * Mac OS X Keychain

    3)svn --version --verbose : 除了参见程序版本和RA模块,还参阅依赖项版本

    --verbose:打印额外的信息

    userdeMBP:~ user$ svn --version --verbose
    svn, version 1.10.0 (r1827917)
       compiled Aug 14 2018, 02:37:13 on x86_64-apple-darwin17.0.0
    
    Copyright (C) 2018 The Apache Software Foundation.
    This software consists of contributions made by many people;
    see the NOTICE file for more information.
    Subversion is open source software, see http://subversion.apache.org/
    
    The following repository access (RA) modules are available:
    
    * ra_svn : Module for accessing a repository using the svn network protocol.
      - with Cyrus SASL authentication
      - handles 'svn' scheme
    * ra_local : Module for accessing a repository on local disk.
      - handles 'file' scheme
    * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      - using serf 1.3.9 (compiled with 1.3.9)
      - handles 'http' scheme
      - handles 'https' scheme
    
    The following authentication credential caches are available:
    
    * Plaintext cache in /Users/user/.subversion
    * GPG-Agent
    * Mac OS X Keychain
    
    System information:
    
    * running on x86_64-apple-darwin18.0.0
      - Mac OS X 10.14, build 18A391
    * linked dependencies:
      - APR 1.5.2 (compiled with 1.5.2)
      - APR-Util 1.5.4 (compiled with 1.5.4)
      - Expat 2.2.1 (compiled with 2.2.1)
      - SQLite 3.24.0 (compiled with 3.24.0)
      - Utf8proc 2.1.0 (compiled with 2.1.0)
      - ZLib 1.2.11 (compiled with 1.2.11)
      - LZ4 1.7.5 (compiled with 1.7.5)
    * loaded shared libraries:
      - /Library/Developer/CommandLineTools/usr/bin/svn   (Intel 64-bit)
      - /Library/Developer/CommandLineTools/usr/lib/libsvn_client-1.0.dylib   (Intel 64-bit)
      - /Library/Developer/CommandLineTools/usr/lib/libsvn_wc-1.0.dylib   (Intel 64-bit)
      - /Library/Developer/CommandLineTools/usr/lib/libsvn_ra-1.0.dylib   (Intel 64-bit)
    ...

    4)svn --version --quiet :只得到版本号信息

    userdeMBP:~ user$ svn --version --quiet
    1.10.0
  • 相关阅读:
    团队介绍及项目介绍
    2017年秋季个人阅读计划
    软件需求分析阅读笔记
    Cookie学习总结
    暑期兴趣班第二天学习总结
    暑期兴趣班第一天学习总结
    个人总结
    第十六周工作总结
    第十五周工作总结
    第十四周工作总结
  • 原文地址:https://www.cnblogs.com/wanghui-garcia/p/10219883.html
Copyright © 2020-2023  润新知