Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fail with an error if a file is outside the checkout tree. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
b3ec774ab7edcaa610aa216fd94cd502 |
| User & Date: | drh 2008-02-08 16:24:24.000 |
Context
|
2008-02-08
| ||
| 17:22 | Avoid showing a short block of unchanged code at the end of a unified diff. check-in: ba433cc4fc user: drh tags: trunk | |
| 16:24 | Fail with an error if a file is outside the checkout tree. check-in: b3ec774ab7 user: drh tags: trunk | |
|
2008-02-07
| ||
| 18:01 | fixed a 2-string memleak in tagview_page_list_tags() check-in: 2ae7890060 user: stephan tags: trunk | |
Changes
Changes to src/checkin.c.
| ︙ | ︙ | |||
288 289 290 291 292 293 294 |
int ii;
Blob b;
blob_zero(&b);
g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
for(ii=2; ii<g.argc; ii++){
int iId;
| | < < | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
int ii;
Blob b;
blob_zero(&b);
g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
for(ii=2; ii<g.argc; ii++){
int iId;
file_tree_name(g.argv[ii], &b);
iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
if( iId<0 ){
fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
}
g.aCommitFile[ii-2] = iId;
blob_reset(&b);
}
|
| ︙ | ︙ |
Changes to src/diffcmd.c.
| ︙ | ︙ | |||
97 98 99 100 101 102 103 |
if( zExternalCommand==0 ){
internalDiff=1;
}
blob_zero(&cmd);
blob_appendf(&cmd, "%s ", zExternalCommand);
}
zFile = g.argv[g.argc-1];
| | < < | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
if( zExternalCommand==0 ){
internalDiff=1;
}
blob_zero(&cmd);
blob_appendf(&cmd, "%s ", zExternalCommand);
}
zFile = g.argv[g.argc-1];
file_tree_name(zFile, &fname);
blob_zero(&vname);
do{
blob_reset(&vname);
blob_appendf(&vname, "%s~%d", zFile, cnt++);
}while( access(blob_str(&vname),0)==0 );
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
282 283 284 285 286 287 288 |
printf("%s\n", blob_buffer(&x));
blob_reset(&x);
}
}
/*
** Compute a pathname for a file relative to the root of the local
| | | > | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
printf("%s\n", blob_buffer(&x));
blob_reset(&x);
}
}
/*
** Compute a pathname for a file relative to the root of the local
** tree. Return TRUE on success. On failure, print and error
** message and quit.
**
** The root of the tree is defined by the g.zLocalRoot variable.
*/
int file_tree_name(const char *zOrigName, Blob *pOut){
int n;
Blob full;
db_must_be_within_tree();
file_canonical_name(zOrigName, &full);
n = strlen(g.zLocalRoot);
if( blob_size(&full)<=n || memcmp(g.zLocalRoot, blob_buffer(&full), n) ){
blob_reset(&full);
fossil_fatal("file outside of checkout tree: %s", zOrigName);
return 0;
}
blob_zero(pOut);
blob_append(pOut, blob_buffer(&full)+n, blob_size(&full)-n);
return 1;
}
|
| ︙ | ︙ |
Changes to src/update.c.
| ︙ | ︙ | |||
301 302 303 304 305 306 307 |
if( g.argc<3 ){
usage("?OPTIONS FILE");
}
db_must_be_within_tree();
zFile = mprintf("%/", g.argv[g.argc-1]);
| | < < | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
if( g.argc<3 ){
usage("?OPTIONS FILE");
}
db_must_be_within_tree();
zFile = mprintf("%/", g.argv[g.argc-1]);
file_tree_name(zFile, &fname);
if( access(zFile, 0) ) yesRevert = 1;
if( yesRevert==0 ){
char *prompt = mprintf("revert file %B? this will"
" destroy local changes [y/N]? ",
&fname);
blob_zero(&ans);
|
| ︙ | ︙ |
Changes to src/wiki.c.
| ︙ | ︙ | |||
594 595 596 597 598 599 600 | @ <p>The <verbatim> tag disables all wiki and HTML markup @ up through the next </verbatim>. The <nowiki> tag @ disables all wiki formatting rules through the matching @ </nowiki> element. @ </ol> style_footer(); } | < | 594 595 596 597 598 599 600 | @ <p>The <verbatim> tag disables all wiki and HTML markup @ up through the next </verbatim>. The <nowiki> tag @ disables all wiki formatting rules through the matching @ </nowiki> element. @ </ol> style_footer(); } |