简体   繁体   English

如何在NetBeans中强制本地文件同步?

[英]How do you force a local file sync within NetBeans?

I currently have a NetBeans php project setup to sync from my user directory to a different local directory /var/www/myproject . 我目前有一个NetBeans php项目设置,可以从我的用户目录同步到另一个本地目录/ var / www / myproject。 This works great when I'm developing locally (adding, deleting and changing files). 当我在本地开发(添加,删除和更改文件)时,这非常有用。 The problem occurs when I do an update from source control and pull down changes from another developer. 当我从源代码管理进行更新并从其他开发人员下拉更改时,会出现此问题。 NetBeans does not sync the project files after the source control update. 源控件更新后,NetBeans不会同步项目文件。 (I have tried the svn update from within the IDE and from a terminal prompt...same result). (我已经尝试过IDE中的svn更新和终端提示......同样的结果)。

Is there a way within the IDE to force the local sync? IDE中是否有办法强制进行本地同步?

Ubuntu 10.04 NetBeans 6.9.1 Source Control - SVN Ubuntu 10.04 NetBeans 6.9.1源代码控制 - SVN

The easiest way I know is to deactivate the " copy files from Sources Folder to another location " option and then reactivate it. 我知道的最简单的方法是停用将文件从源文件夹复制到另一个位置 ”选项,然后重新激活它。

Always save configuration changes. 始终保存配置更改。

Restarting the "copy files.." option always starts the local syncronization. 重新启动“copy files ..”选项始终会启动本地同步。

The only way I've found, is to delete the whole project-directory within /var/www/vhosts/ or wherever your server files are (the local copy of real project folder, /var/www/myproject in your question). 我找到的唯一方法是删除/ var / www / vhosts /中的整个项目目录或服务器文件所在的位置(实际项目文件夹的本地副本,问题中的/ var / www / myproject)。 Then restart Netbeans IDE. 然后重启Netbeans IDE。

You can also change the folder name of the destination, and then copy the config filies, etc. if needed. 您还可以更改目标的文件夹名称,然后根据需要复制配置文件等。 This way the config files are not lost, if you need to have them stored in the destination folder, and not in netbeans. 这样,配置文件不会丢失,如果您需要将它们存储在目标文件夹中,而不是存储在netbeans中。 (Autogenerated conf file for Drupal for instance, I tend to not have them in netbeans) You can then delete the old destination folder, and create that one when you need to sync again. (例如,Drupal的自动生成的conf文件,我倾向于在netbeans中没有它们)然后,您可以删除旧的目标文件夹,并在需要再次同步时创建该目标文件夹。 It is my experience that it is only needed when files are changed outside of netbeans. 根据我的经验,只有在netbeans之外更改文件时才需要它。

您还可以(至少在netbeans 7.4中)在项目属性屏幕上设置复选框“打开项目时复制文件”(位于“从源文件夹复制文件......”下方),然后关闭并重新打开项目你从SVN中拉出别人的变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM