Bazaar:忽略本地文件而不是集中存储库中的文件?

发布于 2024-08-19 20:14:47 字数 318 浏览 3 评论 0原文

我们有一个集中的开发服务器,每个人都通过本地结账进行工作。我们如何才能仅忽略本地存储库中的特定目录,而不是集中存储库中的特定目录?

一些背景信息:该项目是一个 Drupal 站点,该站点的 files 目录始终在变化。由于我们不希望将本地 files 目录的任何更改提交到集中存储库,因此我们使用 .bzrignore 忽略该目录。问题是,这意味着集中式开发服务器上的 files 目录也将被忽略,这不是我们想要的。我们希望在更新/签出时获取其更改,但无法将我们自己的更改提交到 files 目录。

We have a centralized development server, with everyone working from local checkouts. How can we ignore a specific directory only in our local repositories and not in the centralized repository?

Some background information: The project is a Drupal site, and the files directory of this site is always in flux. As we don't want any changes to the local files directory to be committed to the centralized repo, we ignore this directory using .bzrignore. The problem is that this means the files directory on the centralized development server will also be ignored, which is not what we want. We want to get its changes when updating/checking out, but not be able to commit our own changes to the files directory.

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

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

发布评论

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

评论(3

泪意 2024-08-26 20:14:47

目前似乎无法直接执行这样的任务。但是,它已添加到 bzr 中的愿望清单问题跟踪器

At the moment it seems not to be possible to perform such a task directly. It is, however, already added to the wishlist in bzr issue tracker.

待天淡蓝洁白时 2024-08-26 20:14:47

现在您可以使用视图来隐藏它们。只需生成一个仅包含您要保留的文件的视图。

为了在我的 Mac OS X 机器上执行此操作,我运行了以下命令:

find dir1/ dir2/ | sed 's/\(.*\)/"\1"/g' | xargs bzr view --name keep-versioned

在删除视图之前,工作副本目录中不在 dir1 或 dir2 中的所有文件都将被忽略,如下所示:

bzr view --delete --name keep-versioned

For now you can use views to hide them. Just generate a view with just the files you want to keep.

To do this with on my Mac OS X machine I ran the following commands:

find dir1/ dir2/ | sed 's/\(.*\)/"\1"/g' | xargs bzr view --name keep-versioned

All the files in your working copy directory not in dir1 or dir2 will be ignored until you delete the view, like so:

bzr view --delete --name keep-versioned
浅唱々樱花落 2024-08-26 20:14:47

对于全局使用,您可以在以下位置设置模式:
~/.bazaar/ignore

我有版本 Bazaar 2.5.1 并且它可以工作。

For global usage you can set pattern in:
~/.bazaar/ignore

I have version Bazaar 2.5.1 and it works.

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