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".

drh 2008-11-09 13:41 trunk
Commit 6eddf50cfee715099d3eebe3c313e96d939cf2c1
1 file changed +8 -4
+8 -4
--- src/manifest.c
+++ src/manifest.c
@@ -518,22 +518,26 @@
518518
}
519519
break;
520520
}
521521
522522
/*
523
- ** U <login>
523
+ ** U ?<login>?
524524
**
525525
** Identify the user who created this control file by their
526526
** login. Only one U line is allowed. Prohibited in clusters.
527
+ ** If the user name is omitted, take that to be "anonymous".
527528
*/
528529
case 'U': {
529530
md5sum_step_text(blob_buffer(&line), blob_size(&line));
530531
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
+ }
532538
if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error;
533
- p->zUser = blob_terminate(&a1);
534
- defossilize(p->zUser);
535539
break;
536540
}
537541
538542
/*
539543
** W <size>
540544
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button