Fossil SCM
Branching now working correctly, including adding of bgcolor tag and correct R line
Commit
2ad378d06534c3bd0e33baf148514ac5d790b606
Parent
dea1ae50d3f9d7e…
2 files changed
+25
-24
+9
-3
+25
-24
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -29,15 +29,15 @@ | ||
| 29 | 29 | #include <assert.h> |
| 30 | 30 | |
| 31 | 31 | void branch_new(void){ |
| 32 | 32 | int vid, nvid, noSign; |
| 33 | 33 | Stmt q; |
| 34 | - char *zBranch, *zUuid, *zDate, *zComment, *zManifestFile; | |
| 34 | + char *zBranch, *zUuid, *zDate, *zComment; | |
| 35 | 35 | const char *zColor; |
| 36 | 36 | Blob manifest; |
| 37 | 37 | Blob mcksum; /* Self-checksum on the manifest */ |
| 38 | - Blob cksum1, cksum2, dskcksum1; /* Before and after commit checksums */ | |
| 38 | + Blob cksum1, cksum2; /* Before and after commit checksums */ | |
| 39 | 39 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 40 | 40 | |
| 41 | 41 | noSign = find_option("nosign","",0)!=0; |
| 42 | 42 | db_must_be_within_tree(); |
| 43 | 43 | noSign = db_get_int("omit-ci-sig", 0)|noSign; |
| @@ -48,41 +48,29 @@ | ||
| 48 | 48 | /* fossil branch new name */ |
| 49 | 49 | if( g.argc<3 ){ |
| 50 | 50 | usage("branch new ?-bgcolor COLOR BRANCH-NAME"); |
| 51 | 51 | } |
| 52 | 52 | zBranch = g.argv[3]; |
| 53 | + if( zBranch==0 || zBranch[0]==0 ){ | |
| 54 | + fossil_panic("branch name cannot be empty"); | |
| 55 | + } | |
| 53 | 56 | |
| 54 | 57 | user_select(); |
| 55 | 58 | db_begin_transaction(); |
| 56 | 59 | if( unsaved_changes() ){ |
| 57 | 60 | fossil_panic("there are uncommitted changes. please commit first"); |
| 58 | 61 | } |
| 59 | 62 | |
| 60 | - /* Create a new rid? */ | |
| 61 | - zManifestFile = mprintf("%smanifest", g.zLocalRoot); | |
| 62 | - blob_read_from_file(&manifest, zManifestFile); | |
| 63 | - free(zManifestFile); | |
| 64 | - | |
| 65 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 66 | - zDate[10] = 'T'; | |
| 67 | - | |
| 68 | - blob_appendf(&manifest, "D %s\n", zDate); | |
| 69 | - blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 70 | - | |
| 71 | - md5sum_init(); | |
| 72 | - md5sum_step_blob(&manifest); | |
| 73 | - md5sum_finish(&cksum1); | |
| 74 | - | |
| 75 | - blob_reset(&manifest); | |
| 76 | - | |
| 77 | 63 | vid = db_lget_int("checkout", 0); |
| 78 | - vfile_aggregate_checksum_disk(vid, &dskcksum1); | |
| 64 | + vfile_aggregate_checksum_disk(vid, &cksum1); | |
| 79 | 65 | |
| 80 | 66 | /* Create our new manifest */ |
| 81 | 67 | blob_zero(&manifest); |
| 82 | 68 | zComment = mprintf("Branch created %s", zBranch); |
| 83 | 69 | blob_appendf(&manifest, "C %F\n", zComment); |
| 70 | + zDate = db_text(0, "SELECT datetime('now')"); | |
| 71 | + zDate[10] = 'T'; | |
| 84 | 72 | blob_appendf(&manifest, "D %s\n", zDate); |
| 85 | 73 | |
| 86 | 74 | db_prepare(&q, |
| 87 | 75 | "SELECT pathname, uuid FROM vfile JOIN blob ON vfile.mrid=blob.rid" |
| 88 | 76 | " WHERE NOT deleted AND vfile.vid=%d" |
| @@ -97,13 +85,20 @@ | ||
| 97 | 85 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 98 | 86 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 99 | 87 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 100 | 88 | |
| 101 | 89 | if( zColor!=0 ){ |
| 102 | - blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 90 | + if( strcmp("bgcolor",zBranch)>=0 ){ | |
| 91 | + blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 92 | + blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 93 | + }else{ | |
| 94 | + blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 95 | + blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 96 | + } | |
| 97 | + }else{ | |
| 98 | + blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 103 | 99 | } |
| 104 | - blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 105 | 100 | |
| 106 | 101 | /* Cancel any tags that propagate */ |
| 107 | 102 | db_prepare(&q, |
| 108 | 103 | "SELECT tagname" |
| 109 | 104 | " FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid" |
| @@ -135,11 +130,17 @@ | ||
| 135 | 130 | } |
| 136 | 131 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 137 | 132 | manifest_crosslink(nvid, &manifest); |
| 138 | 133 | content_deltify(vid, nvid, 0); |
| 139 | 134 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 140 | - printf("New_Version: %s\n", zUuid); | |
| 135 | + printf("Branch Version: %s\n", zUuid); | |
| 136 | + printf("\n"); | |
| 137 | + printf("Notice: working copy not updated to the new branch. If\n"); | |
| 138 | + printf(" you wish to work on the new branch, update to\n"); | |
| 139 | + printf(" that branch first:\n"); | |
| 140 | + printf("\n"); | |
| 141 | + printf(" fossil update %s\n", zBranch); | |
| 141 | 142 | |
| 142 | 143 | /* Verify that the manifest checksum matches the expected checksum */ |
| 143 | 144 | vfile_aggregate_checksum_repository(nvid, &cksum2); |
| 144 | 145 | vfile_aggregate_checksum_manifest(nvid, &cksum2, &cksum1b); |
| 145 | 146 | if( blob_compare(&cksum1, &cksum1b) ){ |
| @@ -147,11 +148,11 @@ | ||
| 147 | 148 | "%b versus %b", &cksum1, &cksum1b); |
| 148 | 149 | } |
| 149 | 150 | |
| 150 | 151 | /* Verify that the commit did not modify any disk images. */ |
| 151 | 152 | vfile_aggregate_checksum_disk(vid, &cksum2); |
| 152 | - if( blob_compare(&dskcksum1, &cksum2) ){ | |
| 153 | + if( blob_compare(&cksum1, &cksum2) ){ | |
| 153 | 154 | fossil_panic("tree checksums before and after commit do not match"); |
| 154 | 155 | } |
| 155 | 156 | |
| 156 | 157 | /* Clear the undo/redo stack */ |
| 157 | 158 | undo_reset(); |
| 158 | 159 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -29,15 +29,15 @@ | |
| 29 | #include <assert.h> |
| 30 | |
| 31 | void branch_new(void){ |
| 32 | int vid, nvid, noSign; |
| 33 | Stmt q; |
| 34 | char *zBranch, *zUuid, *zDate, *zComment, *zManifestFile; |
| 35 | const char *zColor; |
| 36 | Blob manifest; |
| 37 | Blob mcksum; /* Self-checksum on the manifest */ |
| 38 | Blob cksum1, cksum2, dskcksum1; /* Before and after commit checksums */ |
| 39 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 40 | |
| 41 | noSign = find_option("nosign","",0)!=0; |
| 42 | db_must_be_within_tree(); |
| 43 | noSign = db_get_int("omit-ci-sig", 0)|noSign; |
| @@ -48,41 +48,29 @@ | |
| 48 | /* fossil branch new name */ |
| 49 | if( g.argc<3 ){ |
| 50 | usage("branch new ?-bgcolor COLOR BRANCH-NAME"); |
| 51 | } |
| 52 | zBranch = g.argv[3]; |
| 53 | |
| 54 | user_select(); |
| 55 | db_begin_transaction(); |
| 56 | if( unsaved_changes() ){ |
| 57 | fossil_panic("there are uncommitted changes. please commit first"); |
| 58 | } |
| 59 | |
| 60 | /* Create a new rid? */ |
| 61 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 62 | blob_read_from_file(&manifest, zManifestFile); |
| 63 | free(zManifestFile); |
| 64 | |
| 65 | zDate = db_text(0, "SELECT datetime('now')"); |
| 66 | zDate[10] = 'T'; |
| 67 | |
| 68 | blob_appendf(&manifest, "D %s\n", zDate); |
| 69 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 70 | |
| 71 | md5sum_init(); |
| 72 | md5sum_step_blob(&manifest); |
| 73 | md5sum_finish(&cksum1); |
| 74 | |
| 75 | blob_reset(&manifest); |
| 76 | |
| 77 | vid = db_lget_int("checkout", 0); |
| 78 | vfile_aggregate_checksum_disk(vid, &dskcksum1); |
| 79 | |
| 80 | /* Create our new manifest */ |
| 81 | blob_zero(&manifest); |
| 82 | zComment = mprintf("Branch created %s", zBranch); |
| 83 | blob_appendf(&manifest, "C %F\n", zComment); |
| 84 | blob_appendf(&manifest, "D %s\n", zDate); |
| 85 | |
| 86 | db_prepare(&q, |
| 87 | "SELECT pathname, uuid FROM vfile JOIN blob ON vfile.mrid=blob.rid" |
| 88 | " WHERE NOT deleted AND vfile.vid=%d" |
| @@ -97,13 +85,20 @@ | |
| 97 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 98 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 99 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 100 | |
| 101 | if( zColor!=0 ){ |
| 102 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 103 | } |
| 104 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 105 | |
| 106 | /* Cancel any tags that propagate */ |
| 107 | db_prepare(&q, |
| 108 | "SELECT tagname" |
| 109 | " FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid" |
| @@ -135,11 +130,17 @@ | |
| 135 | } |
| 136 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 137 | manifest_crosslink(nvid, &manifest); |
| 138 | content_deltify(vid, nvid, 0); |
| 139 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 140 | printf("New_Version: %s\n", zUuid); |
| 141 | |
| 142 | /* Verify that the manifest checksum matches the expected checksum */ |
| 143 | vfile_aggregate_checksum_repository(nvid, &cksum2); |
| 144 | vfile_aggregate_checksum_manifest(nvid, &cksum2, &cksum1b); |
| 145 | if( blob_compare(&cksum1, &cksum1b) ){ |
| @@ -147,11 +148,11 @@ | |
| 147 | "%b versus %b", &cksum1, &cksum1b); |
| 148 | } |
| 149 | |
| 150 | /* Verify that the commit did not modify any disk images. */ |
| 151 | vfile_aggregate_checksum_disk(vid, &cksum2); |
| 152 | if( blob_compare(&dskcksum1, &cksum2) ){ |
| 153 | fossil_panic("tree checksums before and after commit do not match"); |
| 154 | } |
| 155 | |
| 156 | /* Clear the undo/redo stack */ |
| 157 | undo_reset(); |
| 158 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -29,15 +29,15 @@ | |
| 29 | #include <assert.h> |
| 30 | |
| 31 | void branch_new(void){ |
| 32 | int vid, nvid, noSign; |
| 33 | Stmt q; |
| 34 | char *zBranch, *zUuid, *zDate, *zComment; |
| 35 | const char *zColor; |
| 36 | Blob manifest; |
| 37 | Blob mcksum; /* Self-checksum on the manifest */ |
| 38 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 39 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 40 | |
| 41 | noSign = find_option("nosign","",0)!=0; |
| 42 | db_must_be_within_tree(); |
| 43 | noSign = db_get_int("omit-ci-sig", 0)|noSign; |
| @@ -48,41 +48,29 @@ | |
| 48 | /* fossil branch new name */ |
| 49 | if( g.argc<3 ){ |
| 50 | usage("branch new ?-bgcolor COLOR BRANCH-NAME"); |
| 51 | } |
| 52 | zBranch = g.argv[3]; |
| 53 | if( zBranch==0 || zBranch[0]==0 ){ |
| 54 | fossil_panic("branch name cannot be empty"); |
| 55 | } |
| 56 | |
| 57 | user_select(); |
| 58 | db_begin_transaction(); |
| 59 | if( unsaved_changes() ){ |
| 60 | fossil_panic("there are uncommitted changes. please commit first"); |
| 61 | } |
| 62 | |
| 63 | vid = db_lget_int("checkout", 0); |
| 64 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 65 | |
| 66 | /* Create our new manifest */ |
| 67 | blob_zero(&manifest); |
| 68 | zComment = mprintf("Branch created %s", zBranch); |
| 69 | blob_appendf(&manifest, "C %F\n", zComment); |
| 70 | zDate = db_text(0, "SELECT datetime('now')"); |
| 71 | zDate[10] = 'T'; |
| 72 | blob_appendf(&manifest, "D %s\n", zDate); |
| 73 | |
| 74 | db_prepare(&q, |
| 75 | "SELECT pathname, uuid FROM vfile JOIN blob ON vfile.mrid=blob.rid" |
| 76 | " WHERE NOT deleted AND vfile.vid=%d" |
| @@ -97,13 +85,20 @@ | |
| 85 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 86 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 87 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 88 | |
| 89 | if( zColor!=0 ){ |
| 90 | if( strcmp("bgcolor",zBranch)>=0 ){ |
| 91 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 92 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 93 | }else{ |
| 94 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 95 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 96 | } |
| 97 | }else{ |
| 98 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 99 | } |
| 100 | |
| 101 | /* Cancel any tags that propagate */ |
| 102 | db_prepare(&q, |
| 103 | "SELECT tagname" |
| 104 | " FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid" |
| @@ -135,11 +130,17 @@ | |
| 130 | } |
| 131 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 132 | manifest_crosslink(nvid, &manifest); |
| 133 | content_deltify(vid, nvid, 0); |
| 134 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 135 | printf("Branch Version: %s\n", zUuid); |
| 136 | printf("\n"); |
| 137 | printf("Notice: working copy not updated to the new branch. If\n"); |
| 138 | printf(" you wish to work on the new branch, update to\n"); |
| 139 | printf(" that branch first:\n"); |
| 140 | printf("\n"); |
| 141 | printf(" fossil update %s\n", zBranch); |
| 142 | |
| 143 | /* Verify that the manifest checksum matches the expected checksum */ |
| 144 | vfile_aggregate_checksum_repository(nvid, &cksum2); |
| 145 | vfile_aggregate_checksum_manifest(nvid, &cksum2, &cksum1b); |
| 146 | if( blob_compare(&cksum1, &cksum1b) ){ |
| @@ -147,11 +148,11 @@ | |
| 148 | "%b versus %b", &cksum1, &cksum1b); |
| 149 | } |
| 150 | |
| 151 | /* Verify that the commit did not modify any disk images. */ |
| 152 | vfile_aggregate_checksum_disk(vid, &cksum2); |
| 153 | if( blob_compare(&cksum1, &cksum2) ){ |
| 154 | fossil_panic("tree checksums before and after commit do not match"); |
| 155 | } |
| 156 | |
| 157 | /* Clear the undo/redo stack */ |
| 158 | undo_reset(); |
| 159 |
+9
-3
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -97,11 +97,11 @@ | ||
| 97 | 97 | ** returned then the Manifest object is cleared automatically |
| 98 | 98 | ** and pContent is reset before the return. |
| 99 | 99 | */ |
| 100 | 100 | int manifest_parse(Manifest *p, Blob *pContent){ |
| 101 | 101 | int seenHeader = 0; |
| 102 | - int i; | |
| 102 | + int i, lineNo=0; | |
| 103 | 103 | Blob line, token, a1, a2, a3; |
| 104 | 104 | Blob selfuuid; |
| 105 | 105 | char cPrevType = 0; |
| 106 | 106 | |
| 107 | 107 | memset(p, 0, sizeof(*p)); |
| @@ -115,10 +115,11 @@ | ||
| 115 | 115 | blob_zero(&a1); |
| 116 | 116 | blob_zero(&a2); |
| 117 | 117 | md5sum_init(); |
| 118 | 118 | while( blob_line(pContent, &line) ){ |
| 119 | 119 | char *z = blob_buffer(&line); |
| 120 | + lineNo++; | |
| 120 | 121 | if( z[0]=='-' ){ |
| 121 | 122 | if( strncmp(z, "-----BEGIN PGP ", 15)!=0 ){ |
| 122 | 123 | goto manifest_syntax_error; |
| 123 | 124 | } |
| 124 | 125 | if( seenHeader ){ |
| @@ -249,12 +250,16 @@ | ||
| 249 | 250 | ** Tags are not allowed in clusters. Multiple T lines are allowed. |
| 250 | 251 | */ |
| 251 | 252 | case 'T': { |
| 252 | 253 | char *zName, *zUuid, *zValue; |
| 253 | 254 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 254 | - if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; | |
| 255 | - if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error; | |
| 255 | + if( blob_token(&line, &a1)==0 ){ | |
| 256 | + goto manifest_syntax_error; | |
| 257 | + } | |
| 258 | + if( blob_token(&line, &a2)==0 ){ | |
| 259 | + goto manifest_syntax_error; | |
| 260 | + } | |
| 256 | 261 | zName = blob_terminate(&a1); |
| 257 | 262 | zUuid = blob_terminate(&a2); |
| 258 | 263 | if( blob_token(&line, &a3)==0 ){ |
| 259 | 264 | zValue = 0; |
| 260 | 265 | }else{ |
| @@ -399,10 +404,11 @@ | ||
| 399 | 404 | |
| 400 | 405 | md5sum_init(); |
| 401 | 406 | return 1; |
| 402 | 407 | |
| 403 | 408 | manifest_syntax_error: |
| 409 | + /*fprintf(stderr, "Manifest error on line %i\n", lineNo);fflush(stderr);*/ | |
| 404 | 410 | md5sum_init(); |
| 405 | 411 | manifest_clear(p); |
| 406 | 412 | return 0; |
| 407 | 413 | } |
| 408 | 414 | |
| 409 | 415 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -97,11 +97,11 @@ | |
| 97 | ** returned then the Manifest object is cleared automatically |
| 98 | ** and pContent is reset before the return. |
| 99 | */ |
| 100 | int manifest_parse(Manifest *p, Blob *pContent){ |
| 101 | int seenHeader = 0; |
| 102 | int i; |
| 103 | Blob line, token, a1, a2, a3; |
| 104 | Blob selfuuid; |
| 105 | char cPrevType = 0; |
| 106 | |
| 107 | memset(p, 0, sizeof(*p)); |
| @@ -115,10 +115,11 @@ | |
| 115 | blob_zero(&a1); |
| 116 | blob_zero(&a2); |
| 117 | md5sum_init(); |
| 118 | while( blob_line(pContent, &line) ){ |
| 119 | char *z = blob_buffer(&line); |
| 120 | if( z[0]=='-' ){ |
| 121 | if( strncmp(z, "-----BEGIN PGP ", 15)!=0 ){ |
| 122 | goto manifest_syntax_error; |
| 123 | } |
| 124 | if( seenHeader ){ |
| @@ -249,12 +250,16 @@ | |
| 249 | ** Tags are not allowed in clusters. Multiple T lines are allowed. |
| 250 | */ |
| 251 | case 'T': { |
| 252 | char *zName, *zUuid, *zValue; |
| 253 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 254 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 255 | if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error; |
| 256 | zName = blob_terminate(&a1); |
| 257 | zUuid = blob_terminate(&a2); |
| 258 | if( blob_token(&line, &a3)==0 ){ |
| 259 | zValue = 0; |
| 260 | }else{ |
| @@ -399,10 +404,11 @@ | |
| 399 | |
| 400 | md5sum_init(); |
| 401 | return 1; |
| 402 | |
| 403 | manifest_syntax_error: |
| 404 | md5sum_init(); |
| 405 | manifest_clear(p); |
| 406 | return 0; |
| 407 | } |
| 408 | |
| 409 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -97,11 +97,11 @@ | |
| 97 | ** returned then the Manifest object is cleared automatically |
| 98 | ** and pContent is reset before the return. |
| 99 | */ |
| 100 | int manifest_parse(Manifest *p, Blob *pContent){ |
| 101 | int seenHeader = 0; |
| 102 | int i, lineNo=0; |
| 103 | Blob line, token, a1, a2, a3; |
| 104 | Blob selfuuid; |
| 105 | char cPrevType = 0; |
| 106 | |
| 107 | memset(p, 0, sizeof(*p)); |
| @@ -115,10 +115,11 @@ | |
| 115 | blob_zero(&a1); |
| 116 | blob_zero(&a2); |
| 117 | md5sum_init(); |
| 118 | while( blob_line(pContent, &line) ){ |
| 119 | char *z = blob_buffer(&line); |
| 120 | lineNo++; |
| 121 | if( z[0]=='-' ){ |
| 122 | if( strncmp(z, "-----BEGIN PGP ", 15)!=0 ){ |
| 123 | goto manifest_syntax_error; |
| 124 | } |
| 125 | if( seenHeader ){ |
| @@ -249,12 +250,16 @@ | |
| 250 | ** Tags are not allowed in clusters. Multiple T lines are allowed. |
| 251 | */ |
| 252 | case 'T': { |
| 253 | char *zName, *zUuid, *zValue; |
| 254 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 255 | if( blob_token(&line, &a1)==0 ){ |
| 256 | goto manifest_syntax_error; |
| 257 | } |
| 258 | if( blob_token(&line, &a2)==0 ){ |
| 259 | goto manifest_syntax_error; |
| 260 | } |
| 261 | zName = blob_terminate(&a1); |
| 262 | zUuid = blob_terminate(&a2); |
| 263 | if( blob_token(&line, &a3)==0 ){ |
| 264 | zValue = 0; |
| 265 | }else{ |
| @@ -399,10 +404,11 @@ | |
| 404 | |
| 405 | md5sum_init(); |
| 406 | return 1; |
| 407 | |
| 408 | manifest_syntax_error: |
| 409 | /*fprintf(stderr, "Manifest error on line %i\n", lineNo);fflush(stderr);*/ |
| 410 | md5sum_init(); |
| 411 | manifest_clear(p); |
| 412 | return 0; |
| 413 | } |
| 414 | |
| 415 |