svn

SVN 分支与合并

 ̄綄美尐妖づ 提交于 2019-12-19 01:05:40
分支的基本概念就正如它的名字,开发的一条线独立于另一条线,如果回顾历史,可以发现两条线分享共同的历史,一个分支总是从一个备份开始的,从那里开始,发展自己独有的历史(如下图所示) ⑴创建分支 假设目前我们版本库中的项目的布局如下图: 如图所示,我们的项目放在了trunk(主线)目录,另外还有branch(分支)和tags(标签)目录,这样的布局是为了更清晰的区别主线、分支和标签三者的位置。 subversion对分支和标签是通过复制一份最新的版本库的快照来实现的。 开始创建分支: 在我们CheckOut的主线目录(trunk)上,右键点击然后选择“Branch/tag…” 在弹出的窗口中,将To Url 指向branch目录并输入分支的具体目录名,这里是mybranch1.0,我们即将创建的分支便存放于此处,点击OK。 Update一下本地的branch目录,你就可以看到你刚刚创建的分支“mybranch1.0”,这样一来我们的分支就创建完成了。 创建分支的最大的目的就是跟主线进行并行开发的时候不影响主线的开发。 因为你在分支上所做的提交都只存于分支上,主线上的Update是看不到分支的修改的。如下图所示,trunk只能看到r344的版本,并看不到r343的版本。 (什么时候应该使用分支呢?例如你接到了一个任务,完成这个任务需要三四个人的合作,你们之间需要共享资源

How to make Subversion (or any program) perform periodic commits?

流过昼夜 提交于 2019-12-19 00:43:23
问题 I want to configure my computer so that say every half an hour it automatically commits the program I am working on. I am using a svn repository so even if it was just a script that ran 'svn ci' every 30 min that would be okay. The problem is that I don't know how to do that. Could somebody please tell me, or direct me to something, that would let me get this periodic commit stuff working? Thanks in advance. EDIT: Sorry it appears that I have confused people as to why I would want to do this.

possible to recreate svn repository from (full) git-svn clone?

邮差的信 提交于 2019-12-19 00:42:49
问题 As title, is there any way to reconstruct a svn repo from a full clone with git-svn (containing every single commit starting from r1)? Edit: I probably should add that I am looking for a practical means to do it (near-perfect copy is okay as long as it remains usable just as the original svn repository) 回答1: Yes, it's possible to create an SVN repository rather close to your git-svn repository (even restoring svn:mergeinfo from Git merge commits and svn:ignore from .gitignore). The steps to

SVN: Moving repository trunk to another's branch (with history)

自作多情 提交于 2019-12-18 20:49:42
问题 I'm working with an SVN setup with a lot of repositories. I'm trying to consolidate some by moving the trunk of one into the branch of another (the old ones are themed versions of the new one, minus some code fixes I'll be applying later, so it makes sense to me). Short version, I want to go from RepositoryA/trunk to RepositoryB/branches/RepAName. Ideally, I'd like to maintain the history. I could do an export -> import, but that loses the history and so it isn't ideal. I can't do a dump via

svn与git的区别

﹥>﹥吖頭↗ 提交于 2019-12-18 20:33:09
版本控制器的作用: 1.可以协同代码管理,让团队开发项目得以实现。 2.可以回归以前提交的任意一个版本的代码。 3.可以查看每个人具体的操作,便于出现问题能够及时准确地排查。 SVN svn即版本控制器,主要是为了多人协同开发项目,管理代码,也可以管理个人代码,也叫程序界的“后悔药”。 svn是一个 集中式 的版本控制系统,严重依赖服务器端,当服务器端无法使用的时候,版本控制也就无法再使用了。 GIT git是一个开源的 分布式 版本控制系统,当这个系统的任何一个客户端出现问题的时候,都可以从另外的客户端获取所有的代码(即使服务器宕机了)。 svn与git的区别: 1.git是分布式的版本控制系统,而svn是集中式的版本控制系统。 2.git是每个历史版本都存储完整的文件,而svn只是存储每个历史版本的差异文件。 3.git可以离线完成大部分操作,而svn必须要联网。 4.git克隆一个完整项目的速度非常快,而svn非常慢。 5.git的内容完整性要优于svn。 6.git上的分支远比svn上的要强大。 来源: CSDN 作者: wind_xiaomi 链接: https://blog.csdn.net/wind_xiaomi/article/details/103602516

Using SharpSvn to retrieve log entries within a date range

こ雲淡風輕ζ 提交于 2019-12-18 19:11:14
问题 I'm using SharpSvn to interact with my svn repository via C# code. I am using this code to retrieve svn log entries: Collection<SvnLogEventArgs> logitems; var uri = new Uri("http://myserver/svn/foo/bar.txt"); client.GetLog(uri, out logitems); foreach (var logentry in logitems) { string author = logentry.Author; string message = logentry.LogMessage; DateTime checkindate = logentry.Time; } This works well, but now I want to restrict the returned log entries by revision date. This is something

SVN Revert Trunk, remove a revision as if it never existed?

安稳与你 提交于 2019-12-18 18:59:19
问题 Is it possible in the svn server to remove a revision as if it never existed? So we have the following revisions: 1004 // Commit of some bogus code that broke the build and was just wrong 1003 // Change 1.2 1002 // Change 1.1 1001 1000 *** Initial checkin Can we we remove the 1004 in svn and revert back to 1003 as if 1004 never existed? Forgive my ignorance, I'm still learning how to use SVN. 回答1: VCS systems are designed specifically to make this as complicated as possible. You usually do

How do I add File to SVN without Checking out

不问归期 提交于 2019-12-18 18:36:21
问题 I would like to add a file to a remote svn repository without checking out the project. svn add requires the project to be checked out svn import seems to only import directories Any ideas? 回答1: You should be able to use svn import : $ svn help import import: Commit an unversioned file or tree into the repository. Import is able to add individual files and trees to a repository. 回答2: I think it got it. The secret is to include the file name on the url svn import -m "Adding just a file" file

Where is svn.exe for TortoiseSVN? [duplicate]

删除回忆录丶 提交于 2019-12-18 18:33:58
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Where is svn.exe in my machine? I try change username for my repository with command svn propset --revprop svn:author I cannot find program svn.exe . What is wrong 回答1: Current versions of TortoiseSVN do not install command-line SVN client by default. You'll have to: Select it explicitly in the installer (see comment by Stefan) Download it and install it separately from http://subversion.apache.org/packages.html

How can I fix this SVN commit which fails as “out of date”?

◇◆丶佛笑我妖孽 提交于 2019-12-18 18:33:36
问题 In my repository, I have two revisions. The src code is on revision 2, but I had a file that messed up, so I reverted it to revision 1. After a few hours of debugging, that javafile works, but I can't commit it. SVN says that the javafile is out of date. This is probably because I'm editing javafile.java rev1, right? How do I resolve this? I know I could copy/paste my modified javafile rev1 code into its rev2 counterpart, and then commit, but is there another way? Am I using SVN incorrectly?