在比较 Delphi 表单文件的版本时,如何使 Beyond Compare 忽略某些差异

发布于 2024-09-18 18:30:45 字数 451 浏览 6 评论 0 原文

我使用Beyond Compare(版本3.1.10)来比较不同版本的Delphi Form Files,但我不想看到有关ExplicitTop、ExplicitLeft、ExplicitHeight 和ExplicitWidth 的差异。

细节: 这些行始终以许多空白字符开头,然后是“ExplicitXXX =”和一个数字。旧版本的 Delphi 没有这些行,因此我想忽略这些行添加到最新版本中的差异,并且我还想忽略数字已更改的差异。

有谁知道该怎么做?

编辑: 重复(或多或少):

如何配置 BeyondCompare 以忽略注释中 SCM 替换的文本?

I use Beyond Compare (version 3.1.10) to compare different versions of Delphi Form Files, but I don't want to see differences concerning ExplicitTop, ExplicitLeft, ExplicitHeight and ExplicitWidth.

Details:
These lines will always begin with a number of whitespace characters, then "ExplicitXXX = " and a number. Older versions of Delphi didn't have these lines, so I want to ignore differences where these lines are added to the newest version, and I also want to ignore differences where the number has changed.

Does anyone know how to do this?

Edit:
Duplicate (more or less) of:

How do I configure BeyondCompare to ignore SCM replaced text in comments?

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

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

发布评论

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

评论(4

流殇 2024-09-25 18:30:45
  1. 加载一对显示差异的 DFM 文件。
  2. 单击会话设置按钮(又名规则,带有裁判员图标)或使用会话->会话设置菜单项。
  3. 切换到重要性选项卡,然后单击编辑语法...按钮打开第二个对话框。
  4. 单击顶部列表框下方的新建...按钮打开第三个对话框。
  5. 元素名称选项更改为Explicit*,将文本匹配更改为Explicit(Left|Top|Width|Height) = \d+ 并选中匹配字符大小写正则表达式复选框,然后单击确定,然后单击确定< /strong> 在第二个对话框中再次出现。
  6. Explicit* 现在应该出现在原始对话框的语法元素列表中。取消选中它,然后将对话框底部的组合框从仅用于此视图更改为更新会话默认值
  1. Load a pair of DFM files showing the difference.
  2. Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item.
  3. Switch to the Importance tab then click the Edit Grammar... button to open a second dialog.
  4. Click the New... button below the top listbox to open a third dialog.
  5. Change the Element Name option to something like Explicit*, change the Text Matching to Explicit(Left|Top|Width|Height) = \d+ and check the Match character case and Regular expression checkboxes, then click Ok, then click Ok again in the second dialog.
  6. Explicit* should now appear in the original dialog's Grammar Elements list. Uncheck it, then change the combobox at the bottom of the dialog from Use for this view only to Update session defaults.
执手闯天涯 2024-09-25 18:30:45

我不使用Beyond Compare,但如果您想让较新版本的Delphi停止添加(IMO无用)Explicit*属性,您可以使用Andreas Hausladen的DDevExtensions

I don't use Beyond Compare, but if you want to have newer versions of Delphi stop adding the (IMO useless) Explicit* properties, you can use Andreas Hausladen's DDevExtensions

—━☆沉默づ 2024-09-25 18:30:45

就我而言(C#),我想忽略包含我更改的命名空间(因此,使用的)的整行。
参考演练 - 如果行中存在文本,则忽略整行

namespace INSERT.NAMESPACE.HERE 
      changed to 
namespace INSERT.NAMESPACE.HERE.NEW

即 就是这样

在克雷格解决方案的第 5 步中,将文本匹配更改为

" .\*INSERT.NAMESPACE.HERE.\* "

(包括引号)

In my case (C#), I wanted to ignore the entire line which contained namespaces (and thus, using's) which I changed.
(Referenced Walkthrough - Ignore entire line if text exist in line

ie.

namespace INSERT.NAMESPACE.HERE 
      changed to 
namespace INSERT.NAMESPACE.HERE.NEW

To do that

In step 5. of Craig's solution, change the Text Matching to

" .\*INSERT.NAMESPACE.HERE.\* "

(include the quotes)

That's it.

2024-09-25 18:30:45

克雷格·彼得森的回答是正确的。
注意但是! “重要性”选项卡并不总是从会话/会话设置中可见。始终,从文件夹列表视图内部,它不会在那里。似乎某些文件类型也没有它,尽管我对此不太清楚。 BC 有很多选项和插件,我打赌有一个解决方法,但对我来说到目前为止我还不错。
http://www.scootersoftware.com/vbulletin/showthread.php?t=8457

Craig Peterson's answer is correct.
N.B. However! The tab 'importance' is not always visible from Session/Session-settings. Always, from inside a Folder list view, it will not be there. It seems there are certain filetypes that do not have it either, though I'm less clear on that. BC has so many options and plugins I bet there is a workaround, but for me I have been ok so far.
http://www.scootersoftware.com/vbulletin/showthread.php?t=8457

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