Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add a --ignore option to the "extra" command, and an "ignore-glob" setting which causes files with given patterns to be ignored. Tickets [705181a992c] and [5125de2e624]. See also ticket [4e8410bfd69]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
3555c0fc6fd0d1684422c729ac6a571e |
| User & Date: | drh 2010-03-15 17:41:54.000 |
Context
|
2010-03-15
| ||
| 18:09 | Add the --binary option to the "merge" command and a new "binary-glob" setting. These identify files that should be treated as binary files and which should not be subjected to a 3-way merge. check-in: d327f12522 user: drh tags: trunk | |
| 17:41 | Add a --ignore option to the "extra" command, and an "ignore-glob" setting which causes files with given patterns to be ignored. Tickets [705181a992c] and [5125de2e624]. See also ticket [4e8410bfd69]. check-in: 3555c0fc6f user: drh tags: trunk | |
| 16:16 | Show check-ins that mention a ticket in the ticket timeline. check-in: 611b3b206b user: drh tags: trunk | |
Changes
Changes to src/checkin.c.
| ︙ | ︙ | |||
191 192 193 194 195 196 197 198 199 200 |
}else{
printf("UNCHANGED %s\n", zPathname);
}
free(zFullName);
}
db_finalize(&q);
}
/*
** COMMAND: extras
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
}else{
printf("UNCHANGED %s\n", zPathname);
}
free(zFullName);
}
db_finalize(&q);
}
/*
** Construct and return a string which is an SQL expression that will
** be TRUE if value zVal matches any of the GLOB expressions in the list
** zGlobList. For example:
**
** zVal: "x"
** zGlobList: "*.o,*.obj"
**
** Result: "(x GLOB '*.o' OR x GLOB '*.obj')"
**
** Each element of the GLOB list may optionally be enclosed in either '...'
** or "...". This allows commas in the expression. Whitespace at the
** beginning and end of each GLOB pattern is ignored, except when enclosed
** within '...' or "...".
**
** This routine makes no effort to free the memory space it uses.
*/
char *glob_expr(const char *zVal, const char *zGlobList){
Blob expr;
char *zSep = "(";
int nTerm = 0;
int i;
int cTerm;
if( zGlobList==0 || zGlobList[0]==0 ) return "0";
blob_zero(&expr);
while( zGlobList[0] ){
while( isspace(zGlobList[0]) || zGlobList[0]==',' ) zGlobList++;
if( zGlobList[0]==0 ) break;
if( zGlobList[0]=='\'' || zGlobList[0]=='"' ){
cTerm = zGlobList[0];
zGlobList++;
}else{
cTerm = ',';
}
for(i=0; zGlobList[i] && zGlobList[i]!=cTerm; i++){}
if( cTerm==',' ){
while( i>0 && isspace(zGlobList[i-1]) ){ i--; }
}
blob_appendf(&expr, "%s%s GLOB '%.*q'", zSep, zVal, i, zGlobList);
zSep = " OR ";
if( cTerm!=',' && zGlobList[i] ) i++;
zGlobList += i;
if( zGlobList[0] ) zGlobList++;
nTerm++;
}
if( nTerm ){
blob_appendf(&expr, ")");
return blob_str(&expr);
}else{
return "0";
}
}
/*
** COMMAND: extras
** Usage: %fossil extras ?--dotfiles? ?--ignore GLOBPATTERN?
**
** Print a list of all files in the source tree that are not part of
** the current checkout. See also the "clean" command.
**
** Files and subdirectories whose names begin with "." are normally
** ignored but can be included by adding the --dotfiles option.
*/
void extra_cmd(void){
Blob path;
Blob repo;
Stmt q;
int n;
const char *zIgnoreFlag = find_option("ignore",0,1);
int allFlag = find_option("dotfiles",0,0)!=0;
db_must_be_within_tree();
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
n = strlen(g.zLocalRoot);
blob_init(&path, g.zLocalRoot, n-1);
if( zIgnoreFlag==0 ){
zIgnoreFlag = db_get("ignore-glob", 0);
}
vfile_scan(0, &path, blob_size(&path), allFlag);
db_prepare(&q,
"SELECT x FROM sfile"
" WHERE x NOT IN ('manifest','manifest.uuid','_FOSSIL_')"
" AND NOT %s"
" ORDER BY 1",
glob_expr("x", zIgnoreFlag)
);
if( file_tree_name(g.zRepositoryName, &repo, 0) ){
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
}
while( db_step(&q)==SQLITE_ROW ){
printf("%s\n", db_column_text(&q, 0));
}
db_finalize(&q);
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 | ** editor Text editor command used for check-in comments. ** ** gdiff-command External command to run when performing a graphical ** diff. If undefined, text diff will be used. ** ** http-port The TCP/IP port number to use by the "server" ** and "ui" commands. Default: 8080 ** ** localauth If enabled, require that HTTP connections from ** 127.0.0.1 be authenticated by password. If ** false, all HTTP requests from localhost have ** unrestricted access to the repository. ** ** mtime-changes Use file modification times (mtimes) to detect when | > > > > | 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 | ** editor Text editor command used for check-in comments. ** ** gdiff-command External command to run when performing a graphical ** diff. If undefined, text diff will be used. ** ** http-port The TCP/IP port number to use by the "server" ** and "ui" commands. Default: 8080 ** ** ignore-glob The VALUE is a comma-separated list of GLOB patterns ** specifying files that the "extra" command will ignore. ** Example: *.o,*.obj,*.exe ** ** localauth If enabled, require that HTTP connections from ** 127.0.0.1 be authenticated by password. If ** false, all HTTP requests from localhost have ** unrestricted access to the repository. ** ** mtime-changes Use file modification times (mtimes) to detect when |
| ︙ | ︙ | |||
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 |
"auto-captcha",
"autosync",
"clearsign",
"diff-command",
"dont-push",
"editor",
"gdiff-command",
"http-port",
"localauth",
"mtime-changes",
"pgp-command",
"proxy",
"web-browser",
};
| > | 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 |
"auto-captcha",
"autosync",
"clearsign",
"diff-command",
"dont-push",
"editor",
"gdiff-command",
"ignore-glob",
"http-port",
"localauth",
"mtime-changes",
"pgp-command",
"proxy",
"web-browser",
};
|
| ︙ | ︙ |