开发者

Create a folder with patch

We will be using patch files to apply changes to our live system.

However, I saw that when creating a patch from Tortoise any new folders created, are not开发者_JAVA百科 included within the patch.

Maybe this is the way that patch works, but what is the strategy of applying patches that need to add or delete folders/files?

Say you create a patch file from 5 svn revisions. Do I need to track (in the svn log) any folder or files added/deleted and manually create/delete them on the live system before applying the patch?


Not 100% sure if this is a proper answer but I will give you my hunch on why the patch isn't creating your directories.

  1. The patch should be normally created from the root of your application or main folder.
  2. The patch should be applied in this same folder on the instance you want to update.

I think it should create your folders if you try it this way.

BTW, if you already use svn, why not update your live folder straight with svn, or even svn export if you don't want .svn folders on your live site? Much easier to maintain than manually patching.

Good-luck.


You are just missing one small step. You need to tell SVN about any files/folders you have added to your project. In Explorer, right-click on the folder to be added, then select TortoiseSVN -> Add... Now it will be included in any patches you create (see Adding New Files And Directories in the Tortoise SVN documentation). Furthermore, when the patch is applied, any new files/folder will be created - as you would expect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜