Changeset 26516 in vbox
- Timestamp:
- Feb 14, 2010 9:37:33 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
.scm-settings (modified) (3 diffs)
-
src/bldprogs/scm.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.scm-settings
r26515 r26516 28 28 29 29 # 30 # Global settings. 31 # 32 --only-svn-dirs 33 34 # 30 35 # Directories to ignore. 31 36 # … … 35 40 # 36 41 --filter-out-dirs ".svn" 37 --filter-out-dirs "*/ out/."42 --filter-out-dirs "*/*out*/." 38 43 --filter-out-dirs "*/tools/." 39 44 --filter-out-dirs "*/webtools/." … … 75 80 --filter-out-files "*/src/VBox/HostDrivers/VBoxUSB/os2/usbcalls.h" 76 81 --filter-out-files "*/src/VBox/RDP/x11server/Init*.c" 82 --filter-out-files "*/vslick.h" 77 83 78 84 -
trunk/src/bldprogs/scm.cpp
r26507 r26516 208 208 bool fStripTrailingBlanks; 209 209 bool fStripTrailingLines; 210 /** Only recurse into directories containing an .svn dir. */ 211 bool fOnlySvnDirs; 212 /** */ 210 213 unsigned cchTab; 211 /** Only consider files matcihng these patterns. This is only applied to the212 * base names. */214 /** Only consider files matcihng these patterns. This is only applied to the 215 * base names. */ 213 216 char *pszFilterFiles; 214 /** Filter out files matching the following patterns. This is applied to base215 * names as well as the aboslute paths. */217 /** Filter out files matching the following patterns. This is applied to base 218 * names as well as the aboslute paths. */ 216 219 char *pszFilterOutFiles; 217 /** Filter out directories matching the following patterns. This is applied218 * to base names as well as the aboslute paths. All absolute paths ends with a219 * slash and dot ("/."). */220 /** Filter out directories matching the following patterns. This is applied 221 * to base names as well as the aboslute paths. All absolute paths ends with a 222 * slash and dot ("/."). */ 220 223 char *pszFilterOutDirs; 221 224 } SCMSETTINGSBASE; … … 245 248 SCMOPT_STRIP_TRAILING_LINES, 246 249 SCMOPT_NO_STRIP_TRAILING_LINES, 250 SCMOPT_ONLY_SVN_DIRS, 251 SCMOPT_NOT_ONLY_SVN_DIRS, 247 252 SCMOPT_TAB_SIZE, 248 253 SCMOPT_FILTER_OUT_DIRS, … … 349 354 /* .fStripTrailingBlanks = */ true, 350 355 /* .fStripTrailingLines = */ true, 356 /* .fOnlySvnDirs = */ false, 351 357 /* .cchTab = */ 8, 352 358 /* .pszFilterFiles = */ (char *)"", … … 370 376 { "--strip-trailing-lines", SCMOPT_STRIP_TRAILING_LINES, RTGETOPT_REQ_NOTHING }, 371 377 { "--strip-no-trailing-lines", SCMOPT_NO_STRIP_TRAILING_LINES, RTGETOPT_REQ_NOTHING }, 378 { "--only-svn-dirs", SCMOPT_ONLY_SVN_DIRS, RTGETOPT_REQ_NOTHING }, 379 { "--not-only-svn-dirs", SCMOPT_NOT_ONLY_SVN_DIRS, RTGETOPT_REQ_NOTHING }, 372 380 { "--tab-size", SCMOPT_TAB_SIZE, RTGETOPT_REQ_UINT8 }, 373 381 { "--filter-out-dirs", SCMOPT_FILTER_OUT_DIRS, RTGETOPT_REQ_STRING }, … … 1827 1835 case SCMOPT_NO_STRIP_TRAILING_LINES: 1828 1836 pSettings->fStripTrailingLines = false; 1837 return VINF_SUCCESS; 1838 1839 case SCMOPT_ONLY_SVN_DIRS: 1840 pSettings->fOnlySvnDirs = true; 1841 return VINF_SUCCESS; 1842 case SCMOPT_NOT_ONLY_SVN_DIRS: 1843 pSettings->fOnlySvnDirs = false; 1829 1844 return VINF_SUCCESS; 1830 1845 … … 2930 2945 PSCMSETTINGS pSettingsStack, unsigned iRecursion) 2931 2946 { 2947 int rc; 2932 2948 Assert(cchDir > 1 && pszBuf[cchDir - 1] == '.'); 2933 2949 … … 2942 2958 2943 2959 /* 2960 * Check if it's excluded by --only-svn-dir. 2961 */ 2962 if (pSettingsStack->Base.fOnlySvnDirs) 2963 { 2964 rc = RTPathAppend(pszBuf, RTPATH_MAX, ".svn"); 2965 if (RT_FAILURE(rc)) 2966 { 2967 RTMsgError("RTPathAppend: %Rrc\n", rc); 2968 return rc; 2969 } 2970 if (!RTDirExists(pszBuf)) 2971 return VINF_SUCCESS; 2972 2973 Assert(RTPATH_IS_SLASH(pszBuf[cchDir])); 2974 pszBuf[cchDir] = '\0'; 2975 pszBuf[cchDir - 1] = '.'; 2976 } 2977 2978 /* 2944 2979 * Try open and read the directory. 2945 2980 */ 2946 2981 PRTDIR pDir; 2947 intrc = RTDirOpenFiltered(&pDir, pszBuf, RTDIRFILTER_NONE);2982 rc = RTDirOpenFiltered(&pDir, pszBuf, RTDIRFILTER_NONE); 2948 2983 if (RT_FAILURE(rc)) 2949 2984 { … … 3146 3181 g_fDryRun = true; 3147 3182 break; 3148 3149 3183 case 'D': 3150 3184 g_fDryRun = false; … … 3156 3190 3157 3191 case 'h': 3158 RTPrintf(" Source Code Massager\n"3192 RTPrintf("VirtualBox Source Code Massager\n" 3159 3193 "\n" 3160 3194 "Usage: %s [options] <files & dirs>\n" … … 3166 3200 if ((s_aOpts[i].fFlags & RTGETOPT_REQ_MASK) == RTGETOPT_REQ_NOTHING) 3167 3201 { 3168 if ((fAdvanceTwo = i + 1 < RT_ELEMENTS(s_aOpts) && strstr(s_aOpts[i+1].pszLong, "-no-") != NULL)) 3202 fAdvanceTwo = i + 1 < RT_ELEMENTS(s_aOpts) 3203 && ( strstr(s_aOpts[i+1].pszLong, "-no-") != NULL 3204 || strstr(s_aOpts[i+1].pszLong, "-not-") != NULL); 3205 if (fAdvanceTwo) 3169 3206 RTPrintf(" %s, %s\n", s_aOpts[i].pszLong, s_aOpts[i + 1].pszLong); 3170 3207 else … … 3183 3220 case SCMOPT_STRIP_TRAILING_BLANKS: RTPrintf(" Default: %RTbool\n", g_Defaults.fStripTrailingBlanks); break; 3184 3221 case SCMOPT_STRIP_TRAILING_LINES: RTPrintf(" Default: %RTbool\n", g_Defaults.fStripTrailingLines); break; 3222 case SCMOPT_ONLY_SVN_DIRS: RTPrintf(" Default: %RTbool\n", g_Defaults.fOnlySvnDirs); break; 3185 3223 case SCMOPT_TAB_SIZE: RTPrintf(" Default: %u\n", g_Defaults.cchTab); break; 3186 3224 case SCMOPT_FILTER_OUT_DIRS: RTPrintf(" Default: %s\n", g_Defaults.pszFilterOutDirs); break;
Note:
See TracChangeset
for help on using the changeset viewer.

