怎么在Mac上mysql怎么安装使用用TortoiseSVN

怎么在Mac上安装使用TortoiseSVN_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
怎么在Mac上安装使用TortoiseSVN
我有更好的答案
Mac上没有TortoiseSVN。要想在Mac上使用SVN:如果要追求如TortoiseSVN那样的易用性,推荐SnailSVN,该软件可以和Finder集成,基本达到了TortoiseSVN的易用性。
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包mac&安装SVN
mac自带了svn服务端和客户端,所以只需要简单配置一下就可以使用
1、创建svn repository
create&/path/to/svn/repository
2、配置svn用户权限/path/to/svn/repository/conf/目录下存在3个文件:authz,passwd,svnserve.conf。。
对于svnserve.conf,内容如下:
### This file controls the configuration of the svnserve daemon,
### use it to allow access to this repository.&
(If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
### These options control access to the repository for
unauthenticated
### and authenticated users.& Valid values are
"write", "read",
### and "none".& The sample settings below are the
anon-access =
auth-access =
### The password-db option controls the location of the
### database file.& Unless you specify a path
starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password
password-db =
### The authz-db option controls the location of the
authorization
### rules for path-based access control.& Unless
you specify a path
### starting with a /, the file's location is relative to the
### directory.& If you don't specify an authz-db,
no path-based access
### control is done.
### Uncomment the line below to use the default authorization
authz-db = authz
### This option specifies the authentication realm of the
repository.
### If two repositories have the same authentication realm, they
### have the same password database, and vice
versa.& The default realm
### is repository's uuid.
# realm = My First
Repository对于passwd,内容如下:
### This file is an example
password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per
对于authz,内容如下:
### This file is an example authorization file for
### Its format is identical to that of mod_authz_svn
authorization
### files.
### As shown below each section defines authorizations for the path
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to
### single user, to a group of users defined in a special
### section, or to anyone using the '*' wildcard.&
Each definition can
### grant read ('r') access, read-write ('rw') access, or no
harry_and_sally =
harry,sally
harry = rw
# [repository:/baz/fuz]
# @harry_and_sally = rw
3、启动服务器。
svnserve -d -r&/path/to/svn/repository
没有任何提示就说明启动成功了。
svn checkout
svn://127.0.0.1/repository --username=username --password=password
./repository
svnserve的常规命令:
启动(需要用root权限):
svnserve -d -r /你的代码仓库地址/
关闭/重启:
-i :3690 查看svn是否启动
ps aux |grep ‘svn’
查找所有svn启动的进程id,kill
-9 3703 杀死2505这个查找到的svn进程
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。posts - 13,&
comments - 63,&
trackbacks - 0
eclipse中最常使用的SVN插件是subclipse,先到subclipse官网:http://subclipse.tigris.org下载该插件。
如上图,点击&Download and Install&转到下载页面。
选择上图中要安装的版本,比如我这里选择:Links for 1.8.x Release:
接下来,有两种方式来安装subclipse,二选一即可。
1、复制Eclipse update site URL:后边的链接:http://subclipse.tigris.org/update_1.8.x
2、打开eclipse,点击Help-Install New SoftWare,打开窗口:
3、点击add按钮。
4、在name一栏中输入插件名称:
location一栏中输入刚才拷贝的链接:http://subclipse.tigris.org/update_1.8.x
5、点击Ok。
6、如上图,选中Subclipse,并去掉下边Contact all update site...选项前面的勾,然后一路next,直到在线安装完成,如果中间出现提示框,选择OK即可。安装完成会要求你重启eclipse。
1、点击Zipped downloads后面的链接,将该插件下载到本地。
4、在name一栏中输入:subclipse ,点击Archive按钮,选择刚刚下载的插件包。
重启eclipse后,选择Window-Show View-Other
展开SVN,双击打开&SVN资源库&视图
在空白处右击,选择新建-资源库位置
在上图URL一栏中输入SVN访问地址,然后finish,这时候会提示错误:
Failed to load JavaHL Library.These are the errors that were encountered:no libsvnjavahl-1 in java.library.pathno svnjavahl-1 in java.library.pathno svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
说明系统缺少JavaHL,需要我们手动安装。
点击Eclipse-Preferences,展开Team-SVN
从上图也可以看出,SVN接口下边的client显示的是:JavaHL(JNI)Not Available
意思是JavaHL不可用。当然你也可以点击右边的上下箭头来选择 SVNKit...作为client,这样也可以正常使用subclipse,
但是官方建议使用JavaHL作为client,稳定性,速度性都比SVNKit好很多,使用SVNKit有可能出现未知的错误,使你的项目数据受损。(javaHL是通过jni的方式来调用本地的SVN库,所以说速度快,稳定可靠)
查看JavaHL的Wiki文档:http://subclipse.tigris.org/wiki/JavaHL
在下边的OS X中提到:要安装JavaHL需要借助MacPorts或者HomeBrew。(说明:MacPorts和HomeBrew是Mac OS X中的包管理器,类似于Ubuntu中的apt-get和Red Hat的yum,用于安装、卸载、更新软件等)
接下来我们使用MacPorts来安装JavaHL,进入MacPorts的下载页面:http://www.macports.org/install.php
上图中的一段话说明,要安装和运行MacPorts,必须要安装Xcode和Command Line Tools,那么就去Mac App Store下载安装Xcode,免费的,1.65个G。Xcode安装完,打开,点击Xcode-Preferences,切换到Downloads视图,点击下边Command Line Tools后面的Install按钮进行安装。
Xcode和Command Line Tools安装完成之后,回到MacPorts的下载页面,点击下图中的带下划线的系统版本进行下载。我的系统版本是Mountain Lion,所以就点击&Mountain Lion&下载。
下载后,直接点击安装即可,安装过程可能会非常慢,当时我以为安装不下去了,就打算重启电脑,谁知道突然提示说安装完毕。如果你的安装过程一直不动 ,建议重启电脑多试几次。
MacPorts装完之后,打开终端,按照JavaHL的WIKI文档说明,输入:sudo port install subversion-javahlbindings +no_bdb +universal 回车,最后出现一个错误,安装失败!连续试了几次都是如此。看网上很多人都出现了MacPorts安装JavaHL不成功的情况,有人说用HomeBrew可以成功,所以我又改用HomeBrew来安装JavaHL。
由于MacPorts和HomeBrew不兼容,所以我们先把MacPorts卸载。
在终端中输入:
sudo port -f uninstall installed
sudo rm -rf \
/opt/local \
/Applications/DarwinPorts \
/Applications/MacPorts \
/Library/LaunchDaemons/org.macports.* \
/Library/Receipts/DarwinPorts*.pkg \
/Library/Receipts/MacPorts*.pkg \
/Library/StartupItems/DarwinPortsStartup \
/Library/Tcl/darwinports1.0 \
/Library/Tcl/macports1.0 \
~/.macports
MacPorts卸载删除完毕,然后打开HomeBrew的主页:http://brew.sh
将页面拖到最下边,看到下图:
上边白色的一行命令就是用来安装HomeBrew的,可以看到它是一条Ruby命令,说明HomeBrew是用Ruby来实现的。
因为Mac OS X 已经默认安装了Ruby,所以我们直接执行这条命令就可以了。不放心的可以在终端输入:ruby -v 来查看Ruby的版本。
在终端输入:ruby -e "$(curl -fsSL/mxcl/homebrew/go)"
回车,接下来就开始在线安装HomeBrew了,安装时间可能较长,视网络状况而定。homebrew默认是被安装在usr/local下,bin就是它的主目录,并且bin目录的路径已被加入path,在任意目录可以直接执行brew命令。通过brew安装的包都存放在use/local下的Cellar目录中。
当然,为了使目录结构更清晰,我们可以在/usr/local下创建homebrew目录,再将homebrew安装在/usr/local/homebrew下,具体的操作命令是,
终端输入:mkdir homebrew && curl -L/mxcl/homebrew/tarball/master| tar xz --strip 1 -C homebrew
安装完成后,需要更新下homebrew,终端输入:brew update
然后手动将/usr/local/homebrew/bin添加到PATH中即可。
Home Brew安装成功之后,接下来正式开始安装javaHL,终端输入:brew install --universal --java subversion
这个命令在javaHL的Wiki中可以找到)即可开始安装javaHL,安装完成后,它会提示你:You may need to link the Java bindings&&.,然后执行下边的两个sudo命令:
终端输入:sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/homebrew/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
即可大功告成!
最后一行会显示JavaHL的版本。比如我的就是下边的这个样子:版本号是:1.8.0
这时候,我们打开eclipse,建立资源库时又出现一个错误:
Incompatible JavaHL library loaded. Subversion 1.7.x required.
这个错误是说不匹配的JavaHL版本被加载,需要的版本是1.7.x
上边提到我安装的JavaHL版本是1.8.0,打开JavaHL的Wiki文档:http://subclipse.tigris.org/wiki/JavaHL
上图中的表格标识了subclipse与JavaHL的版本对应关系。
我的eclipse中安装的subclipse版本是1.8.22,对应的JavaHL版本应该是1.7.x,所以才会提示版本不匹配。
为了方便,我们把subclipse1.8.22卸载,换成1.10.x,这样就匹配了。
卸载subclipse步骤:打开eclipse,点击Eclipse-About Eclipse
点击Installation Details按钮,选中与subclipse相关的选项,然后点击Uninstall按钮就可以卸载了。
卸载完毕,然后按照上边提到的步骤重新下载安装subclipse 1.10.1,然后重启eclipse,就能够正常建立资源库位置了。
转载注明地址:
阅读(...) 评论() &

我要回帖

更多关于 git安装后怎么使用 的文章

 

随机推荐