Index: /trunk/.scm-settings
===================================================================
--- /trunk/.scm-settings	(revision 26558)
+++ /trunk/.scm-settings	(revision 26559)
@@ -34,5 +34,7 @@
 --only-svn-dirs
 --only-svn-files
---set-svn-eol
+#--set-svn-eol
+--set-svn-executable
+#--set-svn-keywords
 
 #
Index: /trunk/src/bldprogs/scm.cpp
===================================================================
--- /trunk/src/bldprogs/scm.cpp	(revision 26558)
+++ /trunk/src/bldprogs/scm.cpp	(revision 26559)
@@ -238,4 +238,8 @@
     /** Set svn:eol-style if missing or incorrect. */
     bool            fSetSvnEol;
+    /** Set svn:executable according to type (unually this means deleting it). */
+    bool            fSetSvnExecutable;
+    /** Set svn:keyword if completely or partially missing. */
+    bool            fSetSvnKeywords;
     /**  */
     unsigned        cchTab;
@@ -282,4 +286,8 @@
     SCMOPT_SET_SVN_EOL,
     SCMOPT_DONT_SET_SVN_EOL,
+    SCMOPT_SET_SVN_EXECUTABLE,
+    SCMOPT_DONT_SET_SVN_EXECUTABLE,
+    SCMOPT_SET_SVN_KEYWORDS,
+    SCMOPT_DONT_SET_SVN_KEYWORDS,
     SCMOPT_TAB_SIZE,
     SCMOPT_FILTER_OUT_DIRS,
@@ -359,4 +367,6 @@
 static bool rewrite_ForceCRLF(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
 static bool rewrite_AdjustTrailingLines(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
+static bool rewrite_SvnNoExecutable(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
+static bool rewrite_SvnKeywords(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
 static bool rewrite_Makefile_kup(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
 static bool rewrite_Makefile_kmk(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings);
@@ -389,4 +399,6 @@
     /* .fOnlySvnDirs = */           false,
     /* .fSetSvnEol = */             false,
+    /* .fSetSvnExecutable = */      false,
+    /* .fSetSvnKeywords = */        false,
     /* .cchTab = */                 8,
     /* .pszFilterFiles = */         (char *)"",
@@ -416,4 +428,8 @@
     { "--set-svn-eol",                      SCMOPT_SET_SVN_EOL,                     RTGETOPT_REQ_NOTHING },
     { "--dont-set-svn-eol",                 SCMOPT_DONT_SET_SVN_EOL,                RTGETOPT_REQ_NOTHING },
+    { "--set-svn-executable",               SCMOPT_SET_SVN_EXECUTABLE,              RTGETOPT_REQ_NOTHING },
+    { "--dont-set-svn-executable",          SCMOPT_DONT_SET_SVN_EXECUTABLE,         RTGETOPT_REQ_NOTHING },
+    { "--set-svn-keywords",                 SCMOPT_SET_SVN_KEYWORDS,                RTGETOPT_REQ_NOTHING },
+    { "--dont-set-svn-keywords",            SCMOPT_DONT_SET_SVN_KEYWORDS,           RTGETOPT_REQ_NOTHING },
     { "--tab-size",                         SCMOPT_TAB_SIZE,                        RTGETOPT_REQ_UINT8   },
     { "--filter-out-dirs",                  SCMOPT_FILTER_OUT_DIRS,                 RTGETOPT_REQ_STRING  },
@@ -427,4 +443,5 @@
 static PFNSCMREWRITER const g_aRewritersFor_Makefile_kup[] =
 {
+    rewrite_SvnNoExecutable,
     rewrite_Makefile_kup
 };
@@ -435,4 +452,6 @@
     rewrite_StripTrailingBlanks,
     rewrite_AdjustTrailingLines,
+    rewrite_SvnNoExecutable,
+    rewrite_SvnKeywords,
     rewrite_Makefile_kmk
 };
@@ -444,13 +463,27 @@
     rewrite_StripTrailingBlanks,
     rewrite_AdjustTrailingLines,
+    rewrite_SvnNoExecutable,
+    rewrite_SvnKeywords,
     rewrite_C_and_CPP
 };
 
-static PFNSCMREWRITER const g_aRewritersFor_RC[] =
+static PFNSCMREWRITER const g_aRewritersFor_H_and_HPP[] =
 {
     rewrite_ForceNativeEol,
     rewrite_ExpandTabs,
     rewrite_StripTrailingBlanks,
-    rewrite_AdjustTrailingLines
+    rewrite_AdjustTrailingLines,
+    rewrite_SvnNoExecutable,
+    rewrite_C_and_CPP
+};
+
+static PFNSCMREWRITER const g_aRewritersFor_RC[] =
+{
+    rewrite_ForceNativeEol,
+    rewrite_ExpandTabs,
+    rewrite_StripTrailingBlanks,
+    rewrite_AdjustTrailingLines,
+    rewrite_SvnNoExecutable,
+    rewrite_SvnKeywords
 };
 
@@ -472,6 +505,7 @@
 {
     { RT_ELEMENTS(g_aRewritersFor_Makefile_kup), &g_aRewritersFor_Makefile_kup[0], "Makefile.kup" },
-    { RT_ELEMENTS(g_aRewritersFor_Makefile_kmk), &g_aRewritersFor_Makefile_kmk[0], "Makefile.kmk" },
-    { RT_ELEMENTS(g_aRewritersFor_C_and_CPP),    &g_aRewritersFor_C_and_CPP[0],    "*.c|*.h|*.cpp|*.hpp|*.C|*.CPP|*.cxx|*.cc" },
+    { RT_ELEMENTS(g_aRewritersFor_Makefile_kmk), &g_aRewritersFor_Makefile_kmk[0], "Makefile.kmk|Config.kmk" },
+    { RT_ELEMENTS(g_aRewritersFor_C_and_CPP),    &g_aRewritersFor_C_and_CPP[0],    "*.c|*.cpp|*.C|*.CPP|*.cxx|*.cc" },
+    { RT_ELEMENTS(g_aRewritersFor_H_and_HPP),    &g_aRewritersFor_H_and_HPP[0],    "*.h|*.hpp" },
     { RT_ELEMENTS(g_aRewritersFor_RC),           &g_aRewritersFor_RC[0],           "*.rc" },
     { RT_ELEMENTS(g_aRewritersFor_ShellScripts), &g_aRewritersFor_ShellScripts[0], "*.sh|configure" },
@@ -2024,4 +2058,19 @@
             return VINF_SUCCESS;
         case SCMOPT_DONT_SET_SVN_EOL:
+            pSettings->fSetSvnEol = false;
+            return VINF_SUCCESS;
+
+        case SCMOPT_SET_SVN_EXECUTABLE:
+            pSettings->fSetSvnExecutable = true;
+            return VINF_SUCCESS;
+        case SCMOPT_DONT_SET_SVN_EXECUTABLE:
+            pSettings->fSetSvnExecutable = false;
+            return VINF_SUCCESS;
+
+        case SCMOPT_SET_SVN_KEYWORDS:
+            pSettings->fSetSvnKeywords = true;
+            return VINF_SUCCESS;
+        case SCMOPT_DONT_SET_SVN_KEYWORDS:
+            pSettings->fSetSvnKeywords = false;
             return VINF_SUCCESS;
 
@@ -3211,11 +3260,13 @@
         {
             if (rc == VERR_NOT_FOUND)
-                ScmVerbose(pState, 2, " * Settings svn:eol-style to %s (missing)\n", pszDesiredSvnEol);
+                ScmVerbose(pState, 2, " * Setting svn:eol-style to %s (missing)\n", pszDesiredSvnEol);
             else
-                ScmVerbose(pState, 2, " * Settings svn:eol-style to %s (was: %s)\n", pszDesiredSvnEol, pszEol);
-            rc = scmSvnSetProperty(pState, "svn:eol-style", pszDesiredSvnEol);
-            if (RT_FAILURE(rc))
-                RTMsgError("scmSvnSetProperty: %Rrc\n", rc); /** @todo propagate the error somehow... */
-        }
+                ScmVerbose(pState, 2, " * Setting svn:eol-style to %s (was: %s)\n", pszDesiredSvnEol, pszEol);
+            int rc2 = scmSvnSetProperty(pState, "svn:eol-style", pszDesiredSvnEol);
+            if (RT_FAILURE(rc2))
+                RTMsgError("scmSvnSetProperty: %Rrc\n", rc2); /** @todo propagate the error somehow... */
+        }
+        if (RT_SUCCESS(rc))
+            RTStrFree(pszEol);
     }
 
@@ -3335,4 +3386,81 @@
     ScmVerbose(pState, 2, " * Adjusted trailing blank lines\n");
     return true;
+}
+
+/**
+ * Make sure there is no svn:executable keyword on the current file.
+ *
+ * @returns false - the state carries these kinds of changes.
+ * @param   pState              The rewriter state.
+ * @param   pIn                 The input stream.
+ * @param   pOut                The output stream.
+ * @param   pSettings           The settings.
+ */
+static bool rewrite_SvnNoExecutable(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
+{
+    if (   !pSettings->fSetSvnExecutable
+        || !scmSvnIsInWorkingCopy(pState))
+        return false;
+
+    int rc = scmSvnQueryProperty(pState, "svn:executable", NULL);
+    if (RT_SUCCESS(rc))
+    {
+        ScmVerbose(pState, 2, " * removing svn:executable\n");
+        rc = scmSvnDelProperty(pState, "svn:executable");
+        if (RT_FAILURE(rc))
+            RTMsgError("scmSvnSetProperty: %Rrc\n", rc); /** @todo error propagation here.. */
+    }
+    return false;
+}
+
+/**
+ * Make sure the Id and Revision keywords are expanded.
+ *
+ * @returns false - the state carries these kinds of changes.
+ * @param   pState              The rewriter state.
+ * @param   pIn                 The input stream.
+ * @param   pOut                The output stream.
+ * @param   pSettings           The settings.
+ */
+static bool rewrite_SvnKeywords(PSCMRWSTATE pState, PSCMSTREAM pIn, PSCMSTREAM pOut, PCSCMSETTINGSBASE pSettings)
+{
+    if (   !pSettings->fSetSvnKeywords
+        || !scmSvnIsInWorkingCopy(pState))
+        return false;
+
+    char *pszKeywords;
+    int rc = scmSvnQueryProperty(pState, "svn:keywords", &pszKeywords);
+    if (    RT_SUCCESS(rc)
+        && (   !strstr(pszKeywords, "Id") /** @todo need some function for finding a word in a string.  */
+            || !strstr(pszKeywords, "Revision")) )
+    {
+        if (!strstr(pszKeywords, "Id") && !strstr(pszKeywords, "Revision"))
+            rc = RTStrAAppend(&pszKeywords, " Id Revision");
+        else if (!strstr(pszKeywords, "Id"))
+            rc = RTStrAAppend(&pszKeywords, " Id");
+        else
+            rc = RTStrAAppend(&pszKeywords, " Revision");
+        if (RT_SUCCESS(rc))
+        {
+            ScmVerbose(pState, 2, " * changing svn:keywords to '%s'\n", pszKeywords);
+            rc = scmSvnSetProperty(pState, "svn:keywords", pszKeywords);
+            if (RT_FAILURE(rc))
+                RTMsgError("scmSvnSetProperty: %Rrc\n", rc); /** @todo error propagation here.. */
+        }
+        else
+            RTMsgError("RTStrAppend: %Rrc\n", rc); /** @todo error propagation here.. */
+        RTStrFree(pszKeywords);
+    }
+    else if (rc == VERR_NOT_FOUND)
+    {
+        ScmVerbose(pState, 2, " * setting svn:keywords to 'Id Revision'\n");
+        rc = scmSvnSetProperty(pState, "svn:keywords", "Id Revision");
+        if (RT_FAILURE(rc))
+            RTMsgError("scmSvnSetProperty: %Rrc\n", rc); /** @todo error propagation here.. */
+    }
+    else if (RT_SUCCESS(rc))
+        RTStrFree(pszKeywords);
+
+    return false;
 }
 
@@ -3544,6 +3672,5 @@
                                 ScmDiffStreams(pszFilename, &Stream1, pIn, g_fDiffIgnoreEol, g_fDiffIgnoreLeadingWS,
                                                g_fDiffIgnoreTrailingWS, g_fDiffSpecialChars, pBaseSettings->cchTab, g_pStdOut);
-                                ScmVerbose(pState, 3, "would have modified the file \"%s%s\"\n", pszFilename, g_pszChangedSuff);
-                                scmSvnDisplayChanges(pState);
+                                ScmVerbose(pState, 2, "would have modified the file \"%s%s\"\n", pszFilename, g_pszChangedSuff);
                             }
                         }
@@ -3952,4 +4079,7 @@
                         case SCMOPT_ONLY_SVN_DIRS:          RTPrintf("      Default: %RTbool\n", g_Defaults.fOnlySvnDirs); break;
                         case SCMOPT_ONLY_SVN_FILES:         RTPrintf("      Default: %RTbool\n", g_Defaults.fOnlySvnFiles); break;
+                        case SCMOPT_SET_SVN_EOL:            RTPrintf("      Default: %RTbool\n", g_Defaults.fSetSvnEol); break;
+                        case SCMOPT_SET_SVN_EXECUTABLE:     RTPrintf("      Default: %RTbool\n", g_Defaults.fSetSvnExecutable); break;
+                        case SCMOPT_SET_SVN_KEYWORDS:       RTPrintf("      Default: %RTbool\n", g_Defaults.fSetSvnKeywords); break;
                         case SCMOPT_TAB_SIZE:               RTPrintf("      Default: %u\n", g_Defaults.cchTab); break;
                         case SCMOPT_FILTER_OUT_DIRS:        RTPrintf("      Default: %s\n", g_Defaults.pszFilterOutDirs); break;
