Fossil SCM
Show overridden user in commit comment. Ticket [4af785ba].
Commit
7c82dbf5465f7b4d303f32a02811c435c6bb1717
Parent
136519f4be91e5e…
1 file changed
+4
-3
+4
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -415,11 +415,12 @@ | ||
| 415 | 415 | */ |
| 416 | 416 | static void prepare_commit_comment( |
| 417 | 417 | Blob *pComment, |
| 418 | 418 | char *zInit, |
| 419 | 419 | const char *zBranch, |
| 420 | - int parent_rid | |
| 420 | + int parent_rid, | |
| 421 | + const char *zUserOvrd | |
| 421 | 422 | ){ |
| 422 | 423 | const char *zEditor; |
| 423 | 424 | char *zCmd; |
| 424 | 425 | char *zFile; |
| 425 | 426 | Blob text, line; |
| @@ -430,11 +431,11 @@ | ||
| 430 | 431 | "\n" |
| 431 | 432 | "# Enter comments on this check-in. Lines beginning with # are ignored.\n" |
| 432 | 433 | "# The check-in comment follows wiki formatting rules.\n" |
| 433 | 434 | "#\n", -1 |
| 434 | 435 | ); |
| 435 | - blob_appendf(&text, "# user: %s\n", g.zLogin); | |
| 436 | + blob_appendf(&text, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin); | |
| 436 | 437 | if( zBranch && zBranch[0] ){ |
| 437 | 438 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 438 | 439 | }else{ |
| 439 | 440 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 440 | 441 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| @@ -1034,11 +1035,11 @@ | ||
| 1034 | 1035 | }else if( zComFile ){ |
| 1035 | 1036 | blob_zero(&comment); |
| 1036 | 1037 | blob_read_from_file(&comment, zComFile); |
| 1037 | 1038 | }else{ |
| 1038 | 1039 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 1039 | - prepare_commit_comment(&comment, zInit, zBranch, vid); | |
| 1040 | + prepare_commit_comment(&comment, zInit, zBranch, vid, zUserOvrd); | |
| 1040 | 1041 | free(zInit); |
| 1041 | 1042 | } |
| 1042 | 1043 | if( blob_size(&comment)==0 ){ |
| 1043 | 1044 | Blob ans; |
| 1044 | 1045 | blob_zero(&ans); |
| 1045 | 1046 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -415,11 +415,12 @@ | |
| 415 | */ |
| 416 | static void prepare_commit_comment( |
| 417 | Blob *pComment, |
| 418 | char *zInit, |
| 419 | const char *zBranch, |
| 420 | int parent_rid |
| 421 | ){ |
| 422 | const char *zEditor; |
| 423 | char *zCmd; |
| 424 | char *zFile; |
| 425 | Blob text, line; |
| @@ -430,11 +431,11 @@ | |
| 430 | "\n" |
| 431 | "# Enter comments on this check-in. Lines beginning with # are ignored.\n" |
| 432 | "# The check-in comment follows wiki formatting rules.\n" |
| 433 | "#\n", -1 |
| 434 | ); |
| 435 | blob_appendf(&text, "# user: %s\n", g.zLogin); |
| 436 | if( zBranch && zBranch[0] ){ |
| 437 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 438 | }else{ |
| 439 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 440 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| @@ -1034,11 +1035,11 @@ | |
| 1034 | }else if( zComFile ){ |
| 1035 | blob_zero(&comment); |
| 1036 | blob_read_from_file(&comment, zComFile); |
| 1037 | }else{ |
| 1038 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 1039 | prepare_commit_comment(&comment, zInit, zBranch, vid); |
| 1040 | free(zInit); |
| 1041 | } |
| 1042 | if( blob_size(&comment)==0 ){ |
| 1043 | Blob ans; |
| 1044 | blob_zero(&ans); |
| 1045 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -415,11 +415,12 @@ | |
| 415 | */ |
| 416 | static void prepare_commit_comment( |
| 417 | Blob *pComment, |
| 418 | char *zInit, |
| 419 | const char *zBranch, |
| 420 | int parent_rid, |
| 421 | const char *zUserOvrd |
| 422 | ){ |
| 423 | const char *zEditor; |
| 424 | char *zCmd; |
| 425 | char *zFile; |
| 426 | Blob text, line; |
| @@ -430,11 +431,11 @@ | |
| 431 | "\n" |
| 432 | "# Enter comments on this check-in. Lines beginning with # are ignored.\n" |
| 433 | "# The check-in comment follows wiki formatting rules.\n" |
| 434 | "#\n", -1 |
| 435 | ); |
| 436 | blob_appendf(&text, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 437 | if( zBranch && zBranch[0] ){ |
| 438 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 439 | }else{ |
| 440 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 441 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| @@ -1034,11 +1035,11 @@ | |
| 1035 | }else if( zComFile ){ |
| 1036 | blob_zero(&comment); |
| 1037 | blob_read_from_file(&comment, zComFile); |
| 1038 | }else{ |
| 1039 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 1040 | prepare_commit_comment(&comment, zInit, zBranch, vid, zUserOvrd); |
| 1041 | free(zInit); |
| 1042 | } |
| 1043 | if( blob_size(&comment)==0 ){ |
| 1044 | Blob ans; |
| 1045 | blob_zero(&ans); |
| 1046 |