Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | less threatening desc. for removing an artifact from repo |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | lang |
| Files: | files | file ages | folders |
| SHA1: |
6938d5fe8057fc33f00f3455573c2064 |
| User & Date: | bharder 2010-09-17 06:02:42.000 |
Context
|
2010-09-17
| ||
| 06:13 | Add "dismiss" cmd to pair w/ new "DISMISSED" reporting ... (check-in: a50ea974ff user: bharder tags: lang) | |
| 06:02 | less threatening desc. for removing an artifact from repo ... (check-in: 6938d5fe80 user: bharder tags: lang) | |
| 05:35 | Create new branch named "lang" ... (check-in: 6e258c4ae3 user: bharder tags: lang) | |
Changes
Changes to src/add.c.
| ︙ | ︙ | |||
212 213 214 215 216 217 218 |
zFilePath = blob_str(&pathname);
if( !db_exists(
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zFilePath)
){
printf("SKIPPED %s\n", zPath);
}else{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
| | | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
zFilePath = blob_str(&pathname);
if( !db_exists(
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zFilePath)
){
printf("SKIPPED %s\n", zPath);
}else{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
printf("DISMISSED %s\n", zPath);
}
blob_reset(&pathname);
}
blob_resize(&path, origSize);
}
}
closedir(d);
|
| ︙ | ︙ | |||
262 263 264 265 266 267 268 |
file_tree_name(zName, &pathname, 1);
zPath = blob_str(&pathname);
if( !db_exists(
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
fossil_fatal("not in the repository: %s", zName);
}else{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
| | | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
file_tree_name(zName, &pathname, 1);
zPath = blob_str(&pathname);
if( !db_exists(
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
fossil_fatal("not in the repository: %s", zName);
}else{
db_multi_exec("UPDATE vfile SET deleted=1 WHERE pathname=%Q", zPath);
printf("DISMISSED %s\n", zPath);
}
blob_reset(&pathname);
}
free(zName);
}
db_multi_exec("DELETE FROM vfile WHERE deleted AND rid=0");
db_end_transaction(0);
|
| ︙ | ︙ |
Changes to src/checkin.c.
| ︙ | ︙ | |||
50 51 52 53 54 55 56 |
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3)==0;
int isRenamed = db_column_int(&q,4);
char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
blob_append(report, zPrefix, nPrefix);
if( isDeleted ){
| | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3)==0;
int isRenamed = db_column_int(&q,4);
char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
blob_append(report, zPrefix, nPrefix);
if( isDeleted ){
blob_appendf(report, "DISMISSED %s\n", zPathname);
}else if( !file_isfile(zFullName) ){
if( access(zFullName, 0)==0 ){
blob_appendf(report, "NOT_A_FILE %s\n", zPathname);
if( missingIsFatal ){
fossil_warning("not a file: %s", zPathname);
nErr++;
}
}else{
blob_appendf(report, "MISSING %s\n", zPathname);
if( missingIsFatal ){
fossil_warning("missing file: %s", zPathname);
nErr++;
}
}
}else if( isNew ){
blob_appendf(report, "ADDED %s\n", zPathname);
}else if( isDeleted ){
blob_appendf(report, "DISMISSED %s\n", zPathname);
}else if( isChnged==2 ){
blob_appendf(report, "UPDATED_BY_MERGE %s\n", zPathname);
}else if( isChnged==3 ){
blob_appendf(report, "ADDED_BY_MERGE %s\n", zPathname);
}else if( isChnged==1 ){
blob_appendf(report, "EDITED %s\n", zPathname);
}else if( isRenamed ){
|
| ︙ | ︙ | |||
173 174 175 176 177 178 179 |
}else if( !file_isfile(zFullName) ){
if( access(zFullName, 0)==0 ){
printf("NOT_A_FILE %s\n", zPathname);
}else{
printf("MISSING %s\n", zPathname);
}
}else if( isDeleted ){
| | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
}else if( !file_isfile(zFullName) ){
if( access(zFullName, 0)==0 ){
printf("NOT_A_FILE %s\n", zPathname);
}else{
printf("MISSING %s\n", zPathname);
}
}else if( isDeleted ){
printf("DISMISSED %s\n", zPathname);
}else if( chnged ){
printf("EDITED %s\n", zPathname);
}else if( renamed ){
printf("RENAMED %s\n", zPathname);
}else{
printf("UNCHANGED %s\n", zPathname);
}
|
| ︙ | ︙ |
Changes to src/diffcmd.c.
| ︙ | ︙ | |||
235 236 237 238 239 240 241 |
while( db_step(&q)==SQLITE_ROW ){
const char *zPathname = db_column_text(&q,0);
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3);
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
if( isDeleted ){
| | < < | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
while( db_step(&q)==SQLITE_ROW ){
const char *zPathname = db_column_text(&q,0);
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3);
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
if( isDeleted ){
printf("DISMISSED %s\n", zPathname);
}else if( access(zFullName, 0) ){
printf("MISSING %s\n", zPathname);
}else if( isNew ){
printf("ADDED %s\n", zPathname);
}else if( isChnged==3 ){
printf("ADDED_BY_MERGE %s\n", zPathname);
}else{
int srcid = db_column_int(&q, 4);
Blob content;
content_get(srcid, &content);
printf("Index: %s\n======================================="
|
| ︙ | ︙ | |||
310 311 312 313 314 315 316 |
cmp = +1;
}else if( iTo>=mTo.nFile ){
cmp = -1;
}else{
cmp = strcmp(mFrom.aFile[iFrom].zName, mTo.aFile[iTo].zName);
}
if( cmp<0 ){
| | | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
cmp = +1;
}else if( iTo>=mTo.nFile ){
cmp = -1;
}else{
cmp = strcmp(mFrom.aFile[iFrom].zName, mTo.aFile[iTo].zName);
}
if( cmp<0 ){
printf("DISMISSED %s\n", mFrom.aFile[iFrom].zName);
iFrom++;
}else if( cmp>0 ){
printf("ADDED %s\n", mTo.aFile[iTo].zName);
iTo++;
}else if( strcmp(mFrom.aFile[iFrom].zUuid, mTo.aFile[iTo].zUuid)==0 ){
/* No changes */
iFrom++;
|
| ︙ | ︙ |