Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有一种方法可以忽略hg责备中的承诺? 我有很多宏,我想用C++代码替换模板。_C++_C_Mercurial - Fatal编程技术网

有没有一种方法可以忽略hg责备中的承诺? 我有很多宏,我想用C++代码替换模板。

有没有一种方法可以忽略hg责备中的承诺? 我有很多宏,我想用C++代码替换模板。,c++,c,mercurial,C++,C,Mercurial,在这样做时,我必须像这样更改代码 #define stuff_to_do (x) \ do_some_stuff_##x( ); \ do_some_more_stuff( x ); 进入 模板 无效内容(T x){ 做些什么; 多吃点东西吧; } i、 e.到处更改制表符/空格、转义字符和小插入(如) 然而,重要的是,注释可以指向在此之前进行更改的程序员 我可以让mercurial注释忽略特定的提交吗 如果没有,我还能做什么 无法告诉hg annotate不显示某些提交。

在这样做时,我必须像这样更改代码

#define stuff_to_do (x) \
   do_some_stuff_##x( );  \
   do_some_more_stuff( x ); 
进入

模板
无效内容(T x){
做些什么;
多吃点东西吧;
}
i、 e.到处更改制表符/空格、转义字符和小插入(如

然而,重要的是,注释可以指向在此之前进行更改的程序员

  • 我可以让mercurial注释忽略特定的提交吗
  • 如果没有,我还能做什么

    • 无法告诉
      hg annotate
      不显示某些提交。从今以后,人们在检查“最初写这篇文章的人”时,将不得不在“这场大规模的改变”之前先看一看

      以下几点可能会让未来的侦探工作变得更容易:

    • 以非用户身份执行提交。类似于
      hgcommit--user“codeformat bot”
      这样人们就知道不要“责怪”你了
    • 保留旧版本,但将其注释掉——复制旧版本并更改副本而不是更改原始版本将使在注释掉的行上很容易看到原始的错误信息(前提是使用了块注释并且在宏中是合法的…)
    • 有以下几种选择:

      --skip <REV[+]>
          revision to not display (EXPERIMENTAL)
      -w, --ignore-all-space
          ignore white space when comparing lines
      -b, --ignore-space-change
          ignore changes in the amount of white space
      -B, --ignore-blank-lines
          ignore changes whose lines are all blank
      -Z, --ignore-space-at-eol
          ignore changes in whitespace at EOL
      -I, --include <PATTERN[+]>
          include names matching the given patterns
      -X, --exclude <PATTERN[+]>
          exclude names matching the given patterns
      
      ——跳过
      修改为不显示(实验性)
      -w、 --忽略所有空间
      比较行时忽略空白
      -b、 --忽略空间变化
      忽略空白量的变化
      -B、 --忽略空白行
      忽略行全部为空的更改
      -Z、 --忽略下线处的空间
      忽略EOL中空格的更改
      -一、 --包括
      包括与给定模式匹配的名称
      -十、 --排除
      排除与给定模式匹配的名称
      

      添加了实验性的
      --skip
      选项。

      将宏更改为模板不是空白更改!将模板归咎于编写宏的人将是一个谎言。找到宏的错误的正确方法是检查宏提交模板之前的版本的错误。@KlasLindbäck那么,让hg为特定行提供上一个变更集之前的最简单方法是什么?您可以使用
      hg annotate--skip desc(#hg gull ignore”)
      若要跳过提交消息包含文本“#hg gull ignore”(或您喜欢的其他文本)的更改集,请定义一个,定义一个like
      hg mygull
      --skip <REV[+]>
          revision to not display (EXPERIMENTAL)
      -w, --ignore-all-space
          ignore white space when comparing lines
      -b, --ignore-space-change
          ignore changes in the amount of white space
      -B, --ignore-blank-lines
          ignore changes whose lines are all blank
      -Z, --ignore-space-at-eol
          ignore changes in whitespace at EOL
      -I, --include <PATTERN[+]>
          include names matching the given patterns
      -X, --exclude <PATTERN[+]>
          exclude names matching the given patterns