After you start tracking the source of a bunch of open source software, how do you keep your code in sync? Run svn update
every time you want to look at or play with the code?
在开始跟踪一堆开源软件的来源之后,如何让代码保持同步?每次要查看或使用代码时运行svn update?
It strikes me that it would be better to essentially start mirroring the code with (say) a cron
job every night. Have people set up workflows to do this sort of thing? (With alerts when/if any changes you make to the code end up conflicting with the latest update?)
让我感到震惊的是,每天晚上用(例如)一个cron作业开始镜像代码会更好。让人们设置工作流来做这种事吗? (如果您对代码所做的任何更改最终与最新更新冲突,则会显示警报?)
Or am I on my own? (I'm running Mac OS X but interested in general as well as specific solutions.)
还是我靠自己? (我正在运行Mac OS X,但对一般以及特定解决方案感兴趣。)
4 个解决方案
#1
3
The general workflow recommended by the Subversion book is to update your working copy often; at the start of every work-day is a good time. But you don't have to. Just update whenever you feel like seeing the latest changes.
Subversion书籍推荐的一般工作流程是经常更新你的工作副本;在每个工作日的开始是一个美好的时光。但你没必要。只要您想看到最新的更改,只需更新即可。
I have a number of open source repositories checked out under a src/ directory. Every couple of days, I remember to run 'svn up *' from that directory, and it updates all the working copies contained there.
我在src /目录下检出了许多开源存储库。每隔几天,我记得从该目录运行'svn up *',并更新其中包含的所有工作副本。
#2
0
If your repository sends you an email every time someone checks in, why not have a program that checks for those emails and then updates the working copy at that time? This way you're always up to date. Caveats include needlessly burning bandwidth and the possibility of getting odd conflicts when a file you're working on gets updated.
如果您的存储库每次有人签入时都会向您发送电子邮件,为什么没有一个程序来检查这些电子邮件,然后在那时更新工作副本?这样你总是最新的。警告包括不必要地燃烧带宽以及当您正在处理的文件得到更新时出现奇怪冲突的可能性。
Just updating once a day, or once every few days, is only useful when there are a limited number of people working on a project, all in disparate areas of it. When you've got more than five people, and the possibility that they are working in similar parts of the code, updating once an hour, or more frequently, is much better.
只需每天更新一次,或每隔几天更新一次,只有在项目工作人数有限的情况下才有用,所有这些都在不同的领域。当你有超过五个人,并且他们在代码的类似部分工作的可能性,每小时或更频繁地更新一次要好得多。
#3
0
I will update often really only when I use an open source library in my own application, the external repository will actually be part of my project tree, when I update my project it also updates the external repository. I think when you only look at code for research it will only make sense if you want to look at a new feature they released and then update.
我经常只在我自己的应用程序中使用开源库时更新,外部存储库实际上是我项目树的一部分,当我更新我的项目时它也会更新外部存储库。我认为,当你只看代码进行研究时,只有你想要查看他们发布的新功能然后更新才有意义。
#4
0
You might want to look into using svn:externals: http://svnbook.red-bean.com/en/1.0/ch07s03.html
您可能希望了解如何使用svn:externals:http://svnbook.red-bean.com/en/1.0/ch07s03.html
#1
3
The general workflow recommended by the Subversion book is to update your working copy often; at the start of every work-day is a good time. But you don't have to. Just update whenever you feel like seeing the latest changes.
Subversion书籍推荐的一般工作流程是经常更新你的工作副本;在每个工作日的开始是一个美好的时光。但你没必要。只要您想看到最新的更改,只需更新即可。
I have a number of open source repositories checked out under a src/ directory. Every couple of days, I remember to run 'svn up *' from that directory, and it updates all the working copies contained there.
我在src /目录下检出了许多开源存储库。每隔几天,我记得从该目录运行'svn up *',并更新其中包含的所有工作副本。
#2
0
If your repository sends you an email every time someone checks in, why not have a program that checks for those emails and then updates the working copy at that time? This way you're always up to date. Caveats include needlessly burning bandwidth and the possibility of getting odd conflicts when a file you're working on gets updated.
如果您的存储库每次有人签入时都会向您发送电子邮件,为什么没有一个程序来检查这些电子邮件,然后在那时更新工作副本?这样你总是最新的。警告包括不必要地燃烧带宽以及当您正在处理的文件得到更新时出现奇怪冲突的可能性。
Just updating once a day, or once every few days, is only useful when there are a limited number of people working on a project, all in disparate areas of it. When you've got more than five people, and the possibility that they are working in similar parts of the code, updating once an hour, or more frequently, is much better.
只需每天更新一次,或每隔几天更新一次,只有在项目工作人数有限的情况下才有用,所有这些都在不同的领域。当你有超过五个人,并且他们在代码的类似部分工作的可能性,每小时或更频繁地更新一次要好得多。
#3
0
I will update often really only when I use an open source library in my own application, the external repository will actually be part of my project tree, when I update my project it also updates the external repository. I think when you only look at code for research it will only make sense if you want to look at a new feature they released and then update.
我经常只在我自己的应用程序中使用开源库时更新,外部存储库实际上是我项目树的一部分,当我更新我的项目时它也会更新外部存储库。我认为,当你只看代码进行研究时,只有你想要查看他们发布的新功能然后更新才有意义。
#4
0
You might want to look into using svn:externals: http://svnbook.red-bean.com/en/1.0/ch07s03.html
您可能希望了解如何使用svn:externals:http://svnbook.red-bean.com/en/1.0/ch07s03.html