如何使用 Surround SCM 忽略文件?

发布于 2024-10-03 02:41:50 字数 420 浏览 6 评论 0原文

我使用的 Surround SCM 的目录结构如下所示:

root/
  src/
    somecode/
  lib/

我的工作目录如下所示:

root/
  .settings/
  src/
    somecode/
  lib/
  someotherdirectory/
    file.txt

基本上,如果我的 .settings(目录)或 file.txt 的本地副本有,我不希望 Surround 向我报告改变了。这看起来很简单 - 就像 svn 中的忽略一样,但我似乎找不到一种方法来使用环绕来做到这一点。我似乎有很多不需要由我正在使用的 scm 工具处理的本地文件,并且我希望它们不要出现在我的递归差异屏幕中。

关于我如何做到这一点有什么想法吗?

I am using surround SCM with a directory structure that looks like the following:

root/
  src/
    somecode/
  lib/

my working directory looks like this:

root/
  .settings/
  src/
    somecode/
  lib/
  someotherdirectory/
    file.txt

Basically, I don't want surround to report to me if my local copy of .settings (a directory) or file.txt have changed. It seems simple - like an ignore in svn, but I can't seem to find a way to do it with surround. I seem to have a lot of these local files around that don't need to be dealt with by the scm tool I'm using, and I'd prefer them not to show up in my recursive differences screen.

Any thoughts on how I might do this?

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

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

发布评论

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

评论(4

月亮邮递员 2024-10-10 02:41:50

也许模拟该功能的一种方法是使用目录隐藏

隐藏存储库,以便在递归获取、签入、签出或撤消签出文件时跳过它们。如果用户不使用 Surround SCM 中的特定存储库,隐藏可以缩短执行获取、签入、签出和撤消签出命令所需的时间。它还可以通过减少缓存需求来节省本地磁盘空间。

所以你可以先获取该目录,然后隐藏它。

Maybe a way to emulate that feature would be to use directory cloaking:

Cloak repositories to skip them when recursively getting, checking in, checking out, or undoing checked out files. If a user does not work with specific repositories in Surround SCM, cloaking can shorten the time it takes to perform the get, check in, check out, and undo check out commands. It can also save local disk space by reducing cache needs.

So you could first get that directory, then cloak it.

〃安静 2024-10-10 02:41:50

在早期的 Surround SCM 版本中,只有一个服务器/主线选项可以忽略文件或目录,如果该主线上的所有项目都应用相同的忽略规则,则该选项非常有用。从 Surround SCM 2019.1 开始,除了服务器/主线选项之外,还有其他两种方法来指定忽略规则。

  1. 添加特定于存储库的规则以忽略文件和目录,以便递归添加文件、查看工作目录差异以及将更改推送到存储库。规则在 .sscmignore 文件中定义,该文件使用 glob 样式模式并存储在本地工作目录中。如果您想与其他团队成员共享这些规则,请签入 .sscmignore 文件。
  2. 设置用户选项以添加特定于用户的规则以忽略文件和目录,以便递归添加文件、查看工作目录差异以及将更改推送到存储库。这些规则特定于该用户,不会在团队中共享。

In earlier Surround SCM versions, there was only a server/mainline option to ignore files or directories, which was useful if all projects on that mainline applied the same ignore rules. Starting in Surround SCM 2019.1, in addition to the server/mainline options, there are two other methods to specify ignore rules.

  1. Add repository-specific rules to ignore files and directories for recursively adding files, viewing working directory differences, and pushing changes to repositories. Rules are defined in .sscmignore files, which use a glob-style pattern and are stored in local working directories. Check in .sscmignore files if you want to share these rules with other team members.
  2. Set user options to add user-specific rules to ignore files and directories for recursively adding files, viewing working directory differences, and pushing changes to repositories. These rules are specific to this user and are not shared across the team.
安人多梦 2024-10-10 02:41:50

转至 Surround SCM 客户端中的“服务器选项”对话框,然后导航至“文件名/扩展名”类别。有一个“忽略文件或目录名称”设置允许您执行此功能。还有一个“忽略文件扩展名”设置,可能对 .OBJ 文件等有用。

正如 VonC 指出的,您还可以使用 Surround SCM 中的隐藏存储库功能,但您需要对 .settings 目录的每个实例执行此操作,并且仅在将目录添加到 Surround SCM 数据库后才隐藏目录。使用忽略设置告诉 Surround SCM 将此选项应用于所有实例,并在添加操作发生之前应用。

Go to the Server Options dialog in the Surround SCM Client and navigate to the File Names/Extensions category. There is an "Ignore file or directory name" setting that allows you to perform this functionality. There is also an "Ignore file extension" setting that might be useful for things like .OBJ files.

As VonC pointed out, you could also use the cloak repository feature in Surround SCM, but you would need to do that for each instance of the .settings directory and you only cloak directories after they are added into the Surround SCM database. Using the ignore setting tells Surround SCM to apply this option to all instances and it is applied before the add operation occurs.

最近可好 2024-10-10 02:41:50

您只需在 Windows 操作系统级别将文件夹设置为“隐藏”即可,
这也将为环绕 SCM 隐藏它。

You can just set the folder "hidden" on windows OS level,
that will also hide it for surround SCM.

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