开发服务器上的 SVN

发布于 2024-07-22 03:41:28 字数 220 浏览 2 评论 0原文

您好,我是 SVN 新手,想了解一些事情,或者是否有人可以给我指出正确的方向,或者是建议,或者是一些可供阅读的网站。

我已经安装了 subversion 和 tortoise,并且正确安装了 subversion,但我想知道如何从我的计算机处理 htdocs 文件夹中的文件,然后提交文件,一旦我提交,它们就会传输到我的 htdocs 文件夹并准备好当我转到本地主机时查看。

提前致谢。

Hi I'm new to SVN and would like to know a couple of things or if someone can point me in the right direction either advice or some sites to read.

I have subversion and tortoise installed and have subversion installed correctly but I would like to know how I can work on files in my htdocs folder from my machine and then commit the files and once I commit they are transferred to my htdocs folder and are ready to view when i go to the localhost.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

甜点 2024-07-29 03:41:28

这个问题并不完全清楚,但我认为它的意思是您想要处理本地计算机上 htdocs 文件夹中的数据副本,通过本地计算机上的 Web 服务器查看它们,当您满意时,提交更改并将其推广到生产机器上。

如果是这样,恭喜你! 这是一种极好的工作方式。

这正是我们所做的(运行整个动态应用程序的本地版本)。 我们定期提交,然后,要进行发布,只需转到服务器并在服务器上检查 htdocs(或其他内容)时进行 svn 更新。 这可以通过 cron 作业自动完成,但我们喜欢手动完成,因为它可以确保头部首先得到健全性检查,如果更新出现奇怪的情况,就会有人来处理它。

首先:

  • 在您的开发计算机上创建一个 htdocs 和一些文件
  • svn import 该目录
  • 转到您的生产计算机,然后 svn checkout htdocs 目录

This question isn't entirely clear, but I take it to mean that you want to work on a copy of your data in the htdocs folder on your local machine, view them via the web server on your local machine and, when you are happy, commit the changes and roll them out on the production machine.

If so, congratulations! This is an excellent way to work.

This is exactly what we do (to the point of running local versions of entire dynamic applications). We commit on a regular basis and then, to do a release, just go to the server and do an svn update in the checkout of htdocs (or whatever) on the server. This could be automated with a cron job, but we like to do it manually since it ensures that the head gets a sanity check first, and if something goes weird with the update, there's someone right there to deal with it.

To get started:

  • create an htdocs and some files on your development machine
  • svn import that directory
  • go to your production machine, and svn checkout the htdocs dir
所谓喜欢 2024-07-29 03:41:28

我不确定您是否理解 SVN 为您做什么。 它通过在每次提交时创建的检查点来维护您对文件所做的更改的历史记录。 文件本身保留在文件结构中的位置。

听起来您正在寻找一种部署工具,可以将您的工作文件放入您的开发服务器(在您的计算机上)以准备测试,这不是 SVN 的用途。 我不确定解决方案是什么,但我确信这里有人可以为您提供所需的答案。

I'm not sure you are grasping what SVN is doing for you. It's maintaining a history of the changes you make to your files through checkpoints you create on each commit. The files themselves remain where they are in your file structure.

It sounds like you are looking for a kind of deployment tool that would place your working files into your development server (on your machine) ready for testing, that's not what SVN is for. I'm not sure what the solution might be but I'm sure someone here can give you the answer you need.

诗笺 2024-07-29 03:41:28

对于像 CruiseControl.NET 和 Nant 这样的成熟 CI 来说,这似乎太少了。 最简单的方法是创建一个批处理文件,该文件既提交又复制到 htdocs。 类似于

svn ci %message
robocopy . c:\htdocs

命名 commit.bat 并使用 commit "this is my message" 调用它

Seems too little for full-blown CI like CruiseControl.NET with Nant. The easiest way would be to create a batch file that both commits and copies to htdocs. Something like

svn ci %message
robocopy . c:\htdocs

Name that commit.bat and call it with commit "this is my message"

诗酒趁年少 2024-07-29 03:41:28

当您提交时,文件将传输到 SVN 服务器的内部存储库,并且无法直接查看。 然而,任何客户都可以更新他/她的内容,并且更改将是可见的。

无论如何,从 SVN 书籍开始。 这篇文章也非常有用。

When you commit, the files are transferred to the internal repository of the SVN server and they are not directly viewable. However any client can update his/her contents and the changes will be visible.

Anyway start from the SVN book. This article is also very useful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文