Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch nop Excluding Merge-Ins
This is equivalent to a diff from 1dfb33e879 to efc9e1c3b4
2010-09-22
| ||
05:42 | schema change to support "nop". Repos will need to be rebuilt to use this functionality. Closed-Leaf check-in: efc9e1c3b4 user: bharder tags: nop | |
03:03 | typo check-in: cb14ab1809 user: bharder tags: nop | |
02:58 | start of "nop" no-operation command check-in: 46ea03734f user: bharder tags: nop | |
2010-09-19
| ||
01:14 | merge trunk Leaf check-in: 1dfb33e879 user: bharder tags: lang | |
00:56 | Corrections to the built-in help text for the "all" command. check-in: 0183e1917f user: drh tags: trunk | |
2010-09-18
| ||
16:04 | more pedantic language adj check-in: ee96785db6 user: bharder tags: lang | |
Changes to src/add.c.
121 121 while( db_step(&q)==SQLITE_ROW ){ 122 122 const char *zName = db_column_text(&q, 0); 123 123 add_one_file(zName, vid, pOmit); 124 124 } 125 125 db_finalize(&q); 126 126 db_multi_exec("DELETE FROM sfile"); 127 127 } 128 + 129 + 130 + 131 + 132 + 133 + 134 + 128 135 129 136 /* 130 137 ** COMMAND: add 131 138 ** 132 139 ** Usage: %fossil add FILE... 133 140 ** 134 141 ** Make arrangements to add one or more files to the current checkout ................................................................................ 222 229 } 223 230 blob_resize(&path, origSize); 224 231 } 225 232 } 226 233 closedir(d); 227 234 blob_reset(&path); 228 235 } 236 + 237 +/* 238 +** COMMAND: nop 239 +** 240 +** Usage: %fossil nop FILE... 241 +** 242 +** Do nothing to one or more files from the tree. 243 +** 244 +** This command does not remove the files from disk. It just marks the 245 +** files as no longer being part of the project. In other words, future 246 +** changes to the named files will not be versioned. 247 +*/ 248 +void nop_cmd(void){ 249 + int i; 250 + int vid; 251 + 252 + db_must_be_within_tree(); 253 + vid = db_lget_int("checkout", 0); 254 + if( vid==0 ){ 255 + fossil_panic("no checkout to remove from"); 256 + } 257 + db_begin_transaction(); 258 + for(i=2; i<g.argc; i++){ 259 + char *zName; 260 + 261 + zName = mprintf("%/", g.argv[i]); 262 + if( file_isdir(zName) == 1 ){ 263 + del_directory_content(zName); 264 + } else { 265 + char *zPath; 266 + Blob pathname; 267 + file_tree_name(zName, &pathname, 1); 268 + zPath = blob_str(&pathname); 269 + if( !db_exists( 270 + "SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){ 271 + fossil_fatal("not in the repository: %s", zName); 272 + }else{ 273 + db_multi_exec("UPDATE vfile SET deleted=0, chnged=0 WHERE pathname=%Q", zPath); 274 + printf("NOP %s\n", zPath); 275 + } 276 + blob_reset(&pathname); 277 + } 278 + free(zName); 279 + } 280 + db_end_transaction(0); 281 +} 229 282 230 283 /* 231 284 ** COMMAND: rm 232 285 ** COMMAND: delete 233 286 ** COMMAND: dismiss 234 287 ** 235 288 ** Usage: %fossil rm FILE...
Changes to src/schema.c.
413 413 @ -- with vfile.chnged==2 we know that the current version of the file 414 414 @ -- is already in the repository. 415 415 @ -- 416 416 @ -- 417 417 @ CREATE TABLE vfile( 418 418 @ id INTEGER PRIMARY KEY, -- ID of the checked out file 419 419 @ vid INTEGER REFERENCES blob, -- The baseline this file is part of. 420 +@ nop BOOLEAN DEFAULT 0, -- True if no operation to be performed. User toggled. 420 421 @ chnged INT DEFAULT 0, -- 0:unchnged 1:edited 2:m-chng 3:m-add 421 422 @ deleted BOOLEAN DEFAULT 0, -- True if deleted 422 423 @ isexe BOOLEAN, -- True if file should be executable 423 424 @ rid INTEGER, -- Originally from this repository record 424 425 @ mrid INTEGER, -- Based on this record due to a merge 425 426 @ mtime INTEGER, -- Modification time of file on disk 426 427 @ pathname TEXT, -- Full pathname relative to root