Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Eliminate some unnecessary end-of-line spacing |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
7fbc1c3a1f2cfdde389c7c3a2a73380f |
| User & Date: | jan.nijtmans 2015-03-09 08:58:13.485 |
Context
|
2015-03-09
| ||
| 09:09 | Add "fossil forget" as alias to "fossil rm|delete". This opens up the "fossil rm" command for behavior modification, as suggested on ML. ... (check-in: 8cf976d246 user: jan.nijtmans tags: trunk) | |
| 08:58 | Eliminate some unnecessary end-of-line spacing ... (check-in: 7fbc1c3a1f user: jan.nijtmans tags: trunk) | |
| 04:42 | Always report full UUID for checkin and branch commands since they actually alter the repository and should report a complete, unambiguous UUID. ... (check-in: 153e17c5eb user: andybradford tags: trunk) | |
Changes
Changes to src/bundle.c.
| ︙ | ︙ | |||
26 27 28 29 30 31 32 | ** ** The bblob.delta field can be an integer, a text string, or NULL. ** If an integer, then the corresponding blobid is the delta basis. ** If a text string, then that string is a SHA1 hash for the delta ** basis, which is presumably in the master repository. If NULL, then ** data contains contain without delta compression. */ | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ** ** The bblob.delta field can be an integer, a text string, or NULL. ** If an integer, then the corresponding blobid is the delta basis. ** If a text string, then that string is a SHA1 hash for the delta ** basis, which is presumably in the master repository. If NULL, then ** data contains contain without delta compression. */ static const char zBundleInit[] = @ CREATE TABLE IF NOT EXISTS "%w".bconfig( @ bcname TEXT, @ bcvalue ANY @ ); @ CREATE TABLE IF NOT EXISTS "%w".bblob( @ blobid INTEGER PRIMARY KEY, -- Blob ID @ uuid TEXT NOT NULL, -- SHA1 hash of expanded blob |
| ︙ | ︙ | |||
153 154 155 156 157 158 159 |
static void bundle_append_cmd(void){
Blob content, hash;
int i;
Stmt q;
verify_all_options();
bundle_attach_file(g.argv[3], "b1", 1);
| | | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
static void bundle_append_cmd(void){
Blob content, hash;
int i;
Stmt q;
verify_all_options();
bundle_attach_file(g.argv[3], "b1", 1);
db_prepare(&q,
"INSERT INTO bblob(blobid, uuid, sz, delta, data, notes) "
"VALUES(NULL, $uuid, $sz, NULL, $data, $filename)");
db_begin_transaction();
for(i=4; i<g.argc; i++){
int sz;
blob_read_from_file(&content, g.argv[i]);
sz = blob_size(&content);
|
| ︙ | ︙ | |||
186 187 188 189 190 191 192 | ** ** --branch BRANCHNAME All check-ins on the most recent ** instance of BRANCHNAME ** --from TAG1 [--to TAG2] Check-in TAG1 and all primary descendants ** up to and including TAG2 ** --checkin TAG Check-in TAG only ** | | | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
**
** --branch BRANCHNAME All check-ins on the most recent
** instance of BRANCHNAME
** --from TAG1 [--to TAG2] Check-in TAG1 and all primary descendants
** up to and including TAG2
** --checkin TAG Check-in TAG only
**
** Store the RIDs for all applicable check-ins in the zTab table that
** should already exist. Invoke fossil_fatal() if any kind of error is
** seen.
*/
void subtree_from_arguments(const char *zTab){
const char *zBr;
const char *zFrom;
const char *zTo;
|
| ︙ | ︙ | |||
429 430 431 432 433 434 435 |
assert( pBasis!=0 || iSrc==0 );
if( iSrc>0 ){
if( bag_find(&busy, iSrc) ){
fossil_fatal("delta loop while uncompressing bundle artifacts");
}
bag_insert(&busy, iSrc);
}
| | | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
assert( pBasis!=0 || iSrc==0 );
if( iSrc>0 ){
if( bag_find(&busy, iSrc) ){
fossil_fatal("delta loop while uncompressing bundle artifacts");
}
bag_insert(&busy, iSrc);
}
db_prepare(&q,
"SELECT uuid, data, bblob.delta, bix.blobid"
" FROM bix, bblob"
" WHERE bix.delta=%d"
" AND bix.blobid=bblob.blobid;",
iSrc
);
while( db_step(&q)==SQLITE_ROW ){
|
| ︙ | ︙ | |||
621 622 623 624 625 626 627 |
" WHERE NOT EXISTS(SELECT 1 FROM blob WHERE uuid=bblob.uuid AND size>=0);"
"CREATE TEMP TABLE got(rid INTEGER PRIMARY KEY ON CONFLICT IGNORE);"
);
manifest_crosslink_begin();
bundle_import_elements(0, 0, isPriv);
manifest_crosslink_end(0);
describe_artifacts_to_stdout("IN got", "Imported content:");
| | | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
" WHERE NOT EXISTS(SELECT 1 FROM blob WHERE uuid=bblob.uuid AND size>=0);"
"CREATE TEMP TABLE got(rid INTEGER PRIMARY KEY ON CONFLICT IGNORE);"
);
manifest_crosslink_begin();
bundle_import_elements(0, 0, isPriv);
manifest_crosslink_end(0);
describe_artifacts_to_stdout("IN got", "Imported content:");
db_end_transaction(0);
}
/* fossil bundle purge BUNDLE
**
** Try to undo a prior "bundle import BUNDLE".
**
** If the --force option is omitted, then this will only work if
|
| ︙ | ︙ | |||
767 768 769 770 771 772 773 | ** ** fossil bundle ls BUNDLE ** ** List the contents of BUNDLE on standard output ** ** fossil bundle purge BUNDLE ** | | | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | ** ** fossil bundle ls BUNDLE ** ** List the contents of BUNDLE on standard output ** ** fossil bundle purge BUNDLE ** ** Remove from the repository all files that are used exclusively ** by check-ins in BUNDLE. This has the effect of undoing a ** "fossil bundle import". ** ** SUMMARY: ** fossil bundle append BUNDLE FILE... Add files to BUNDLE ** fossil bundle cat BUNDLE UUID... Extract file from BUNDLE ** fossil bundle export BUNDLE ?OPTIONS? Create a new BUNDLE |
| ︙ | ︙ |
Changes to src/foci.c.
| ︙ | ︙ | |||
22 23 24 25 26 27 28 |
**
** Usage example:
**
** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin;
** -- ^^^^--- important!
** SELECT * FROM foci WHERE checkinID=symbolic_name_to_rid('trunk');
**
| | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
**
** Usage example:
**
** CREATE VIRTUAL TABLE temp.foci USING files_of_checkin;
** -- ^^^^--- important!
** SELECT * FROM foci WHERE checkinID=symbolic_name_to_rid('trunk');
**
** The symbolic_name_to_rid('trunk') function finds the BLOB.RID value
** corresponding to the 'trunk' tag. Then the files_of_checkin virtual table
** decodes the manifest defined by that BLOB and returns all files described
** by that manifest. The "schema" for the temp.foci table is:
**
** CREATE TABLE files_of_checkin(
** checkinID INTEGER, -- RID for the check-in manifest
** filename TEXT, -- Name of a file
|
| ︙ | ︙ |
Changes to src/publish.c.
| ︙ | ︙ | |||
97 98 99 100 101 102 103 |
find_checkin_associates("ok", bExclusive);
}
if( bTest ){
/* If the --test option is used, then do not actually publish any
** artifacts. Instead, just list the artifact information on standard
** output. The --test option is useful for verifying correct operation
** of the logic that figures out which artifacts to publish, such as
| | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
find_checkin_associates("ok", bExclusive);
}
if( bTest ){
/* If the --test option is used, then do not actually publish any
** artifacts. Instead, just list the artifact information on standard
** output. The --test option is useful for verifying correct operation
** of the logic that figures out which artifacts to publish, such as
** the find_checkin_associates() routine
*/
describe_artifacts_to_stdout("IN ok", 0);
}else{
/* Standard behavior is simply to remove the published documents from
** the PRIVATE table */
db_multi_exec(
"DELETE FROM ok WHERE rid NOT IN private;"
|
| ︙ | ︙ |
Changes to src/purge.c.
| ︙ | ︙ | |||
26 27 28 29 30 31 32 | /* ** SQL code used to initialize the schema of a bundle. ** ** The purgeevent table contains one entry for each purge event. For each ** purge event, multiple artifacts might have been removed. Each removed ** artifact is stored as an entry in the purgeitem table. ** | | | | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /* ** SQL code used to initialize the schema of a bundle. ** ** The purgeevent table contains one entry for each purge event. For each ** purge event, multiple artifacts might have been removed. Each removed ** artifact is stored as an entry in the purgeitem table. ** ** The purgeevent and purgeitem tables are not synced, even by the ** "fossil config" command. They exist only as a backup in case of a ** mistaken purge or for content recovery in case there is a bug in the ** purge command. */ static const char zPurgeInit[] = @ CREATE TABLE IF NOT EXISTS "%w".purgeevent( @ peid INTEGER PRIMARY KEY, -- Unique ID for the purge event @ ctime DATETIME, -- When purge occurred. Seconds since 1970. @ pnotes TEXT -- Human-readable notes about the purge event @ ); @ CREATE TABLE IF NOT EXISTS "%w".purgeitem( @ piid INTEGER PRIMARY KEY, -- ID for the purge item @ peid INTEGER REFERENCES purgeevent ON DELETE CASCADE, -- Purge event @ orid INTEGER, -- Original RID before purged @ uuid TEXT NOT NULL, -- SHA1 hash of the purged artifact @ srcid INTEGER, -- Basis purgeitem for delta compression @ isPrivate BOOLEAN, -- True if artifact was originally private @ sz INT NOT NULL, -- Uncompressed size of the purged artifact @ desc TEXT, -- Brief description of this artifact @ data BLOB -- Compressed artifact content @ ); |
| ︙ | ︙ | |||
120 121 122 123 124 125 126 |
verify_before_commit(rid);
}
db_finalize(&q);
/* Construct the graveyard and copy the artifacts to be purged into the
** graveyard */
if( moveToGraveyard ){
| | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
verify_before_commit(rid);
}
db_finalize(&q);
/* Construct the graveyard and copy the artifacts to be purged into the
** graveyard */
if( moveToGraveyard ){
db_multi_exec(zPurgeInit /*works-like:"%w%w"*/,
db_name("repository"), db_name("repository"));
db_multi_exec(
"INSERT INTO purgeevent(ctime,pnotes) VALUES(now(),%Q)", zNote
);
peid = db_last_insert_rowid();
db_prepare(&q, "SELECT rid FROM delta WHERE rid IN \"%w\""
" AND srcid NOT IN \"%w\"", zTab, zTab);
|
| ︙ | ︙ | |||
191 192 193 194 195 196 197 | /* Mission accomplished */ db_end_transaction(0); return peid; } /* | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | /* Mission accomplished */ db_end_transaction(0); return peid; } /* ** The TEMP table named zTab contains RIDs for a set of check-ins. ** ** Check to see if any check-in in zTab is a baseline manifest for some ** delta manifest that is not in zTab. Return true if zTab contains a ** baseline for a delta that is not in zTab. ** ** This is a database integrity preservation check. The check-ins in zTab ** are about to be deleted or otherwise made inaccessible. This routine |
| ︙ | ︙ | |||
273 274 275 276 277 278 279 |
"DELETE FROM \"%w_tags\""
" WHERE tid IN (SELECT srcid FROM tagxref"
" WHERE srcid IN \"%w_tags\""
" AND rid NOT IN \"%w\")",
zTab, zTab, zTab
);
}
| | | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
"DELETE FROM \"%w_tags\""
" WHERE tid IN (SELECT srcid FROM tagxref"
" WHERE srcid IN \"%w_tags\""
" AND rid NOT IN \"%w\")",
zTab, zTab, zTab
);
}
/* Transfer the extra artifacts into zTab */
db_multi_exec(
"INSERT OR IGNORE INTO \"%w\" SELECT fid FROM \"%w_files\";"
"INSERT OR IGNORE INTO \"%w\" SELECT tid FROM \"%w_tags\";"
"DROP TABLE \"%w_files\";"
"DROP TABLE \"%w_tags\";",
zTab, zTab, zTab, zTab, zTab, zTab
|
| ︙ | ︙ | |||
375 376 377 378 379 380 381 |
assert( pBasis!=0 || iSrc==0 );
if( iSrc>0 ){
if( bag_find(&busy, iSrc) ){
fossil_fatal("delta loop while uncompressing purged artifacts");
}
bag_insert(&busy, iSrc);
}
| | | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
assert( pBasis!=0 || iSrc==0 );
if( iSrc>0 ){
if( bag_find(&busy, iSrc) ){
fossil_fatal("delta loop while uncompressing purged artifacts");
}
bag_insert(&busy, iSrc);
}
db_prepare(&q,
"SELECT uuid, data, isPrivate, ix.piid"
" FROM ix, purgeitem"
" WHERE ix.srcid=%d"
" AND ix.piid=purgeitem.piid;",
iSrc
);
while( db_step(&q)==SQLITE_ROW ){
|
| ︙ | ︙ | |||
434 435 436 437 438 439 440 | ** ** Write the content of one or more artifacts in the graveyard onto ** standard output. ** ** fossil purge ?checkins? TAGS... ?OPTIONS? ** ** Move the check-ins identified by TAGS and all of their descendants | | | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | ** ** Write the content of one or more artifacts in the graveyard onto ** standard output. ** ** fossil purge ?checkins? TAGS... ?OPTIONS? ** ** Move the check-ins identified by TAGS and all of their descendants ** out of the repository and into the graveyard. The "checkins" ** subcommand keyword is option and can be omitted as long as TAGS ** does not conflict with any other subcommand. ** ** If a TAGS includes a branch name then it means all the check-ins ** on the most recent occurrance of that branch. ** ** --explain Make no changes, but show what would happen. |
| ︙ | ︙ |
Changes to src/search.c.
| ︙ | ︙ | |||
727 728 729 730 731 732 733 |
}
}
/*
** Number of significant bits in a u32
*/
static int nbits(u32 x){
| | | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
}
}
/*
** Number of significant bits in a u32
*/
static int nbits(u32 x){
int n = 0;
while( x ){ n++; x >>= 1; }
return n;
}
/*
** Implemenation of the rank() function used with rank(matchinfo(*,'pcsx')).
*/
|
| ︙ | ︙ | |||
1249 1250 1251 1252 1253 1254 1255 |
}
break;
}
}
}
/*
| | | 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
}
break;
}
}
}
/*
** This routine is a wrapper around search_stext().
**
** This routine looks up the search text, stores it in an internal
** buffer, and returns a pointer to the text. Subsequent requests
** for the same document return the same pointer. The returned pointer
** is valid until the next invocation of this routine. Call this routine
** with an eType of 0 to clear the cache.
*/
|
| ︙ | ︙ | |||
1691 1692 1693 1694 1695 1696 1697 |
}
}
}
if( iCmd==5 ){
if( g.argc<4 ) usage("porter ON/OFF");
db_set_int("search-stemmer", is_truth(g.argv[3]), 0);
}
| | | 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 |
}
}
}
if( iCmd==5 ){
if( g.argc<4 ) usage("porter ON/OFF");
db_set_int("search-stemmer", is_truth(g.argv[3]), 0);
}
/* destroy or rebuild the index, if requested */
if( iAction>=1 ){
search_drop_index();
}
if( iAction>=2 ){
search_rebuild_index();
|
| ︙ | ︙ |
Changes to src/style.c.
| ︙ | ︙ | |||
821 822 823 824 825 826 827 |
@ padding: 10px;
@ margin: 0px;
@ white-space: nowrap;
},
{ "ul.browser li.file",
"List element in the 'flat-view' file browser for a file",
" background-image: url(data:image/gif;base64,R0lGODlhEAAQAJEAAP"
| | | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
@ padding: 10px;
@ margin: 0px;
@ white-space: nowrap;
},
{ "ul.browser li.file",
"List element in the 'flat-view' file browser for a file",
" background-image: url(data:image/gif;base64,R0lGODlhEAAQAJEAAP"
"\\/\\/\\/yEhIf\\/\\/\\/wAAACH5BAEHAAIALAAAAAAQABAAAAIvlIKpxqcfm"
"gOUvoaqDSCxrEEfF14GqFXImJZsu73wepJzVMNxrtNTj3NATMKhpwAAOw==);\n"
" background-repeat: no-repeat;\n"
" background-position: 0px center;\n"
" padding-left: 20px;\n"
" padding-top: 2px;\n"
},
{ "ul.browser li.dir",
|
| ︙ | ︙ |