如何将文件从svn文件夹移动到生产服务器

发布于 2024-07-15 03:11:08 字数 316 浏览 5 评论 0原文

我有一个在源代码控制(SVN)下用 PHP 编写的网站。 我想立即将所有文件从网站目录移动到生产服务器。

问题是这个文件夹中有SVN(.svn)的文件夹。 第二个问题是我不想仅将源代码控制下的文件放在服务器上,也不想将其他文件放在该文件夹中(图像、CSS 等)。

你能告诉我该怎么做吗? 如果它是可重复的那就太好了 - 这样我就只有一个命令要执行。

如果有可能优化上传(不上传未更改的文件)以使整个生产过程更快也会很好。

编辑:

我的开发环境是 Eclipse PDT 和最喜欢的 FTP filezilla。

I have a website written in PHP under source control (SVN). I would like to move at once all my files from the website directory to production server.

The problem is that in this folder there are folders of SVN (.svn). The second problem is that i do not want to put on the server only files under source control, but also other in this folder (images, css, and so on).

Could you please tell me how to do this? It would be nice if it would be repeatable - that so I would have only one command to execute.

And if there would be any possibility to optimize uploading (not uploading not changed files) to make whole process of going production faster would be nice too.

EDIT:

My development environment is Eclipse PDT and favorite FTP filezilla.

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

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

发布评论

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

评论(5

情何以堪。 2024-07-22 03:11:10

您可以使用 subversion 的导出功能,这将允许您导出所有受版本控制的文件,以及所有不受控制的文件。 两种方法都会跳过 .svn 文件夹。

您没有提到您的客户端,但 Tortoise 有“也导出未版本控制的文件”选项。

请参阅此处了解命令行语法

You can use the export function of subversion, this will allow you to export all files under version control, but also all files NOT under control. Both methods will skip the .svn folders.

You didn't mention your client, but Tortoise has the 'export unversioned files too' option.

See here for commandline syntax

小帐篷 2024-07-22 03:11:10

如果 ftp 客户端支持过滤器(排除 .svn 文件夹,即 FlashFXP),则可以使用它。

目前我正在使用 Nusphere PhpEd IDE 的内置功能“智能上传”,因此它仅更新更改的文件(修改时间更改)。

You can use an ftp client if it's support filters (exclude .svn folders, i.e FlashFXP).

Currently I'm using Nusphere PhpEd IDE's built in feature called "Smart upload", so it only updates changed files (with modified time changed).

漫雪独思 2024-07-22 03:11:10

我使用 rsync 这是一个快速命令行工具,仅发送文件的更改部分。 您可以将其设置为排除 .svn 目录,如下所述 此处

如果您希望继续使用 fileZilla 执行此操作,您可以转到“查看”->“文件名过滤器”并选择忽略 SVN 和 CVS 目录。 您也只能使用 FileZilla 上传更改的文件,但我发现 rsync 速度要快得多。 由于 rsync 是基于命令行的,因此您可以轻松地将其与 Eclipse 作为外部工具连接,以实现一键传输

I use rsync which is a fast command line tool which only sends the changed parts of files. You can set it up to exclude .svn directories as outlined here:

If you wish to continue doing this with fileZilla you can go to View->Filename Filters and select to ignore SVN and CVS directories. You can also only upload changed files with FileZilla however I find rsync far faster. As rsync is command line based you could easily hook it up with Eclipse as an external tool to enable 1 click transferring

孤城病女 2024-07-22 03:11:10

您可以使用 springloops,它们涵盖 SVN 提交和签出,但最重要的是只需单击鼠标即可部署到 FTP 服务器...

You can use springloops, they cover SVN commit and checkouts but most importantly deployment to FTP server with a click of a mouse...

神也荒唐 2024-07-22 03:11:10

我最近在运行 Ubuntu 9 时偶然发现了同样的问题。
在 FileZilla 中,您可以选择忽略过滤器,其中甚至包含预设以防止复制 .svn 文件夹和 Windows .thumb 文件! 您可以在文件名过滤器...下的查看菜单中找到它,效果非常好!

为 FileZilla 的人们竖起大拇指!

I stumbled recently on the same issue running Ubuntu 9.
In FileZilla you can choose ignore filters which contain even presets to prevent copying .svn folders and windows .thumb files! You can find this in the View menu under Filename filters... Works like a charm!

Thumbs up for the FileZilla folks!

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