Fossil SCM
All the U card of a ticket change artifact to have no argument. When that happens, the user is assumed to be "anonymous".
Commit
6eddf50cfee715099d3eebe3c313e96d939cf2c1
Parent
2664476fbc2dfd3…
1 file changed
+8
-4
+8
-4
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -518,22 +518,26 @@ | ||
| 518 | 518 | } |
| 519 | 519 | break; |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | /* |
| 523 | - ** U <login> | |
| 523 | + ** U ?<login>? | |
| 524 | 524 | ** |
| 525 | 525 | ** Identify the user who created this control file by their |
| 526 | 526 | ** login. Only one U line is allowed. Prohibited in clusters. |
| 527 | + ** If the user name is omitted, take that to be "anonymous". | |
| 527 | 528 | */ |
| 528 | 529 | case 'U': { |
| 529 | 530 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 530 | 531 | if( p->zUser!=0 ) goto manifest_syntax_error; |
| 531 | - if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; | |
| 532 | + if( blob_token(&line, &a1)==0 ){ | |
| 533 | + p->zUser = "anonymous"; | |
| 534 | + }else{ | |
| 535 | + p->zUser = blob_terminate(&a1); | |
| 536 | + defossilize(p->zUser); | |
| 537 | + } | |
| 532 | 538 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 533 | - p->zUser = blob_terminate(&a1); | |
| 534 | - defossilize(p->zUser); | |
| 535 | 539 | break; |
| 536 | 540 | } |
| 537 | 541 | |
| 538 | 542 | /* |
| 539 | 543 | ** W <size> |
| 540 | 544 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -518,22 +518,26 @@ | |
| 518 | } |
| 519 | break; |
| 520 | } |
| 521 | |
| 522 | /* |
| 523 | ** U <login> |
| 524 | ** |
| 525 | ** Identify the user who created this control file by their |
| 526 | ** login. Only one U line is allowed. Prohibited in clusters. |
| 527 | */ |
| 528 | case 'U': { |
| 529 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 530 | if( p->zUser!=0 ) goto manifest_syntax_error; |
| 531 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 532 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 533 | p->zUser = blob_terminate(&a1); |
| 534 | defossilize(p->zUser); |
| 535 | break; |
| 536 | } |
| 537 | |
| 538 | /* |
| 539 | ** W <size> |
| 540 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -518,22 +518,26 @@ | |
| 518 | } |
| 519 | break; |
| 520 | } |
| 521 | |
| 522 | /* |
| 523 | ** U ?<login>? |
| 524 | ** |
| 525 | ** Identify the user who created this control file by their |
| 526 | ** login. Only one U line is allowed. Prohibited in clusters. |
| 527 | ** If the user name is omitted, take that to be "anonymous". |
| 528 | */ |
| 529 | case 'U': { |
| 530 | md5sum_step_text(blob_buffer(&line), blob_size(&line)); |
| 531 | if( p->zUser!=0 ) goto manifest_syntax_error; |
| 532 | if( blob_token(&line, &a1)==0 ){ |
| 533 | p->zUser = "anonymous"; |
| 534 | }else{ |
| 535 | p->zUser = blob_terminate(&a1); |
| 536 | defossilize(p->zUser); |
| 537 | } |
| 538 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 539 | break; |
| 540 | } |
| 541 | |
| 542 | /* |
| 543 | ** W <size> |
| 544 |