zoukankan      html  css  js  c++  java
  • svn服务器配置 for mac

     

    本文转载至 http://blog.sina.com.cn/s/blog_5e42f31a010156z4.html

    1.找到合适的目录,新建一个版本库的目录:mkdir svn

    创建版本库:svnadmin create /users/qst/svn/repository

     

    2.编辑权限,配置svn权限,其中配置文件所在目录:/users/qst/svn/repository/ conf

    此目录下有三个配置文件:authz/passwd/svnserve.conf

    1)修改authz ,vi authz,如下图:

     

     

    svn服务器配置 <wbr>for <wbr> <wbr>mac <wbr> <wbr>(自己做的)

     

    2)修改passwd,vi passwd,如下图

    svn服务器配置 <wbr>for <wbr> <wbr>mac <wbr> <wbr>(自己做的)

    3)修改svnserve.conf,vi svnserve.conf,如下图:

    Pasted Graphic 4.tiff

     

    3.启动服务器,若无任何提示,一般就启动成功了

    svnserve -d -r /users/qst/svn/repository/

    运用下列命令查看是否启动成功  ps aux|grep svn

     

    注释:svn可以分为单个或多个版本库,假设:

     

         版本库目录为 /data/svndata/repos1

     

         启动程序如果是:svnserve -d -r /data/svndata/repos1  

     

          这代表你当前svn只为repos1这个版本库工作,客户端访问直接svn://IP/ 就可以了,后面不跟目录

     

         启动程序如果是:svnserve -d -r /data/svndata/            

     

         这代表你当前svn可以多版本库运行,客户端访问就需要加上 svn://IP/repos1 这样才能访问repos1版本库

     

     

    4.向svn服务器中导入项目或文件使用命令

    svn import 真实存在的源路径 svn://ip地址/svn/respository --username=zhangsan -m '--初始化项目--'

    随便写点儿什么都行,不写应该也行'

    回车后会提示输入密码,输入你设置好的密码即可

     

    svn import /users/qst/desktop/123 svn://192.168.100.154/svn/repository --username=xx -m 'initial import'

    如下图:

    Pasted Graphic 5.tiff

     

    5.在任何未导出过svn项目的目录下导出项目,执行svn checkout svn://ip地址/svn/repository

    注意:这个路径是可以指定到下面任意一级下的。

     

    Pasted Graphic 6.tiff

     

    有一个问题:checkout  检出到哪个目录下了?

     

    上述语句检出到/users/qst/svn/repository/repository

    有时候做项目是需要获取手机的相关信息,好让用户知道自己的使用情况:

    镔哥就直接写代码了

    /*

    获取手机信息

    应用程序的名称和版本号等信息都保存在mainBundle的一个字典中,用下面代码可以取出来

    */

    NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];

    NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];

    NSString*appName =[infoDict objectForKey:@"CFBundleDisplayName"];

    NSString*text =[NSString stringWithFormat:@"%@ %@",appName,versionNum];

    NSString * strModel = [UIDevice currentDevice].model ;

    NSLog(@"%@",strModel);

    //手机别名: 用户定义的名称

    NSString* userPhoneName = [[UIDevice currentDevice] name];

    NSLog(@"手机别名: %@", userPhoneName);

    //设备名称

    NSString* deviceName = [[UIDevice currentDevice] systemName];

    NSLog(@"设备名称: %@",deviceName );

    //手机系统版本

    NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];

    NSLog(@"手机系统版本: %@", phoneVersion);

    //手机型号

    NSString* phoneModel = [[UIDevice currentDevice] model];

    NSLog(@"手机型号: %@",phoneModel );

    //地方型号 (国际化区域名称)

    NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];

    NSLog(@"国际化区域名称: %@",localPhoneModel );

    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

    // 当前应用名称

    NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];

    NSLog(@"当前应用名称:%@",appCurName);

    // 当前应用软件版本 比如:1.0.1

    NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

    NSLog(@"当前应用软件版本:%@",appCurVersion);

    // 当前应用版本号码 int类型

    NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];

    NSLog(@"当前应用版本号码:%@",appCurVersionNum);

  • 相关阅读:
    11.4 iftop:动态显示网络接口流量信息
    10.2-3 ifup&ifdown:激活与禁用网络接口
    10.1 ifconfig:配置或显示网络接口信息
    10.16-17 mailq&mail:显示邮件传输队列&发送邮件
    10.13 nc:多功能网络工具
    Matplotlib_常用图表
    urlrrtrieve()实例_下载微博短视频
    ulrlib案例-爬取百度贴吧
    Scrapy-Spider
    Scrapy-架构
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/4378745.html
Copyright © 2011-2022 走看看