Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Preserve timestamps across an "update" to reduce I/O on the next "status". Ticket [809a9612055340d06]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
ffe1b60a36be25258a514d4834f12c07 |
| User & Date: | drh 2011-01-18 20:47:00.130 |
Context
|
2011-01-19
| ||
| 02:35 | Optionally record successful and failed login attempts in the ACCESSLOG table. This defaults to off. check-in: 6fdf529803 user: drh tags: trunk | |
|
2011-01-18
| ||
| 20:47 | Preserve timestamps across an "update" to reduce I/O on the next "status". Ticket [809a9612055340d06]. check-in: ffe1b60a36 user: drh tags: trunk | |
| 19:09 | Give user "nobody" clone permission by default. This change requested on the mailing list. check-in: 479a2fe0f7 user: drh tags: trunk | |
Changes
Changes to src/update.c.
| ︙ | ︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
int nochangeFlag; /* -n or --nochange. Do a dry run */
int verboseFlag; /* -v or --verbose. Output extra information */
int debugFlag; /* --debug option */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
}
latestFlag = find_option("latest",0, 0)!=0;
nochangeFlag = find_option("nochange","n",0)!=0;
| > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
int nochangeFlag; /* -n or --nochange. Do a dry run */
int verboseFlag; /* -v or --verbose. Output extra information */
int debugFlag; /* --debug option */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
Stmt mtimeXfer; /* Statment to transfer mtimes */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
}
latestFlag = find_option("latest",0, 0)!=0;
nochangeFlag = find_option("nochange","n",0)!=0;
|
| ︙ | ︙ | |||
297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
/*
** Alter the content of the checkout so that it conforms with the
** target
*/
db_prepare(&q,
"SELECT fn, idv, ridv, idt, ridt, chnged, fnt FROM fv ORDER BY 1"
);
assert( g.zLocalRoot!=0 );
assert( strlen(g.zLocalRoot)>1 );
assert( g.zLocalRoot[strlen(g.zLocalRoot)-1]=='/' );
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0); /* The filename from root */
int idv = db_column_int(&q, 1); /* VFILE entry for current */
| > > > > | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
/*
** Alter the content of the checkout so that it conforms with the
** target
*/
db_prepare(&q,
"SELECT fn, idv, ridv, idt, ridt, chnged, fnt FROM fv ORDER BY 1"
);
db_prepare(&mtimeXfer,
"UPDATE vfile SET mtime=(SELECT mtime FROM vfile WHERE id=:idv)"
" WHERE id=:idt"
);
assert( g.zLocalRoot!=0 );
assert( strlen(g.zLocalRoot)>1 );
assert( g.zLocalRoot[strlen(g.zLocalRoot)-1]=='/' );
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0); /* The filename from root */
int idv = db_column_int(&q, 1); /* VFILE entry for current */
|
| ︙ | ︙ | |||
384 385 386 387 388 389 390 |
nConflict++;
}
if( nameChng && !nochangeFlag ) unlink(zFullPath);
blob_reset(&v);
blob_reset(&e);
blob_reset(&t);
blob_reset(&r);
| | | > > > > | > | 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
nConflict++;
}
if( nameChng && !nochangeFlag ) unlink(zFullPath);
blob_reset(&v);
blob_reset(&e);
blob_reset(&t);
blob_reset(&r);
}else{
if( chnged ){
if( verboseFlag ) printf("EDITED %s\n", zName);
}else{
db_bind_int(&mtimeXfer, ":idv", idv);
db_bind_int(&mtimeXfer, ":idt", idt);
db_step(&mtimeXfer);
db_reset(&mtimeXfer);
if( verboseFlag ) printf("UNCHANGED %s\n", zName);
}
}
free(zFullPath);
free(zFullNewPath);
}
db_finalize(&q);
db_finalize(&mtimeXfer);
printf("--------------\n");
show_common_info(tid, "updated-to:", 1, 0);
/* Report on conflicts
*/
if( nConflict && !nochangeFlag ){
if( internalUpdate ){
|
| ︙ | ︙ |