Fossil SCM
Minor error message improvements.
Commit
80345fd14eafbf416538d7a9e464183c8ad2deda10bbe99db1b25ad9f0022db3
Parent
6407b6ca37902e2…
1 file changed
+9
-7
+9
-7
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -3719,12 +3719,14 @@ | ||
| 3719 | 3719 | style_header("File Editor"); |
| 3720 | 3720 | if(!zRev || !*zRev || !zFilename || !*zFilename){ |
| 3721 | 3721 | fail((&err,"Missing required URL parameters.")); |
| 3722 | 3722 | } |
| 3723 | 3723 | if(0==fileedit_is_editable(zFilename)){ |
| 3724 | - fail((&err,"Filename is disallowed by the fileedit-glob " | |
| 3725 | - "repository setting.")); | |
| 3724 | + fail((&err,"Filename <code>%h</code> is disallowed " | |
| 3725 | + "by the <code>fileedit-glob</code> repository " | |
| 3726 | + "setting.", | |
| 3727 | + zFilename)); | |
| 3726 | 3728 | } |
| 3727 | 3729 | vid = symbolic_name_to_rid(zRev, "ci"); |
| 3728 | 3730 | if(0==vid){ |
| 3729 | 3731 | fail((&err,"Could not resolve checkin version.")); |
| 3730 | 3732 | } |
| @@ -3742,12 +3744,12 @@ | ||
| 3742 | 3744 | } |
| 3743 | 3745 | zFileUuid = mprintf("%s",db_column_text(&stmt, 0)); |
| 3744 | 3746 | } |
| 3745 | 3747 | db_finalize(&stmt); |
| 3746 | 3748 | if(!zFileUuid){ |
| 3747 | - fail((&err,"Checkin [%S] does not contain file: %h", | |
| 3748 | - zRevResolved, zFilename)); | |
| 3749 | + fail((&err,"Checkin [%S] does not contain file: " | |
| 3750 | + "<code>%h</code>", zRevResolved, zFilename)); | |
| 3749 | 3751 | } |
| 3750 | 3752 | frid = fast_uuid_to_rid(zFileUuid); |
| 3751 | 3753 | assert(frid); |
| 3752 | 3754 | |
| 3753 | 3755 | /* Read file content from submit request or repo... */ |
| @@ -3757,12 +3759,12 @@ | ||
| 3757 | 3759 | ? blob_str(&cimi.fileContent) : NULL; |
| 3758 | 3760 | }else{ |
| 3759 | 3761 | blob_init(&cimi.fileContent,zContent,-1); |
| 3760 | 3762 | } |
| 3761 | 3763 | if(looks_like_binary(&cimi.fileContent)){ |
| 3762 | - fail((&err,"File appears to be binary. Cannot edit: %h", | |
| 3763 | - zFilename)); | |
| 3764 | + fail((&err,"File appears to be binary. Cannot edit: " | |
| 3765 | + "<code>%h</code>",zFilename)); | |
| 3764 | 3766 | } |
| 3765 | 3767 | |
| 3766 | 3768 | /* All set. Here we go... */ |
| 3767 | 3769 | #define fp fossil_print |
| 3768 | 3770 | /* ^^^ Appologies, Richard, but the @ form plays havoc with emacs */ |
| @@ -3988,11 +3990,11 @@ | ||
| 3988 | 3990 | fossil_free(zFileUuid); |
| 3989 | 3991 | if(stmt.pStmt){ |
| 3990 | 3992 | db_finalize(&stmt); |
| 3991 | 3993 | } |
| 3992 | 3994 | if(blob_size(&err)){ |
| 3993 | - fp("<div class='fileedit-error-report'>%h</div>", | |
| 3995 | + fp("<div class='fileedit-error-report'>%s</div>", | |
| 3994 | 3996 | blob_str(&err)); |
| 3995 | 3997 | } |
| 3996 | 3998 | blob_reset(&err); |
| 3997 | 3999 | CheckinMiniInfo_cleanup(&cimi); |
| 3998 | 4000 | if(blob_size(&endScript)>0){ |
| 3999 | 4001 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -3719,12 +3719,14 @@ | |
| 3719 | style_header("File Editor"); |
| 3720 | if(!zRev || !*zRev || !zFilename || !*zFilename){ |
| 3721 | fail((&err,"Missing required URL parameters.")); |
| 3722 | } |
| 3723 | if(0==fileedit_is_editable(zFilename)){ |
| 3724 | fail((&err,"Filename is disallowed by the fileedit-glob " |
| 3725 | "repository setting.")); |
| 3726 | } |
| 3727 | vid = symbolic_name_to_rid(zRev, "ci"); |
| 3728 | if(0==vid){ |
| 3729 | fail((&err,"Could not resolve checkin version.")); |
| 3730 | } |
| @@ -3742,12 +3744,12 @@ | |
| 3742 | } |
| 3743 | zFileUuid = mprintf("%s",db_column_text(&stmt, 0)); |
| 3744 | } |
| 3745 | db_finalize(&stmt); |
| 3746 | if(!zFileUuid){ |
| 3747 | fail((&err,"Checkin [%S] does not contain file: %h", |
| 3748 | zRevResolved, zFilename)); |
| 3749 | } |
| 3750 | frid = fast_uuid_to_rid(zFileUuid); |
| 3751 | assert(frid); |
| 3752 | |
| 3753 | /* Read file content from submit request or repo... */ |
| @@ -3757,12 +3759,12 @@ | |
| 3757 | ? blob_str(&cimi.fileContent) : NULL; |
| 3758 | }else{ |
| 3759 | blob_init(&cimi.fileContent,zContent,-1); |
| 3760 | } |
| 3761 | if(looks_like_binary(&cimi.fileContent)){ |
| 3762 | fail((&err,"File appears to be binary. Cannot edit: %h", |
| 3763 | zFilename)); |
| 3764 | } |
| 3765 | |
| 3766 | /* All set. Here we go... */ |
| 3767 | #define fp fossil_print |
| 3768 | /* ^^^ Appologies, Richard, but the @ form plays havoc with emacs */ |
| @@ -3988,11 +3990,11 @@ | |
| 3988 | fossil_free(zFileUuid); |
| 3989 | if(stmt.pStmt){ |
| 3990 | db_finalize(&stmt); |
| 3991 | } |
| 3992 | if(blob_size(&err)){ |
| 3993 | fp("<div class='fileedit-error-report'>%h</div>", |
| 3994 | blob_str(&err)); |
| 3995 | } |
| 3996 | blob_reset(&err); |
| 3997 | CheckinMiniInfo_cleanup(&cimi); |
| 3998 | if(blob_size(&endScript)>0){ |
| 3999 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -3719,12 +3719,14 @@ | |
| 3719 | style_header("File Editor"); |
| 3720 | if(!zRev || !*zRev || !zFilename || !*zFilename){ |
| 3721 | fail((&err,"Missing required URL parameters.")); |
| 3722 | } |
| 3723 | if(0==fileedit_is_editable(zFilename)){ |
| 3724 | fail((&err,"Filename <code>%h</code> is disallowed " |
| 3725 | "by the <code>fileedit-glob</code> repository " |
| 3726 | "setting.", |
| 3727 | zFilename)); |
| 3728 | } |
| 3729 | vid = symbolic_name_to_rid(zRev, "ci"); |
| 3730 | if(0==vid){ |
| 3731 | fail((&err,"Could not resolve checkin version.")); |
| 3732 | } |
| @@ -3742,12 +3744,12 @@ | |
| 3744 | } |
| 3745 | zFileUuid = mprintf("%s",db_column_text(&stmt, 0)); |
| 3746 | } |
| 3747 | db_finalize(&stmt); |
| 3748 | if(!zFileUuid){ |
| 3749 | fail((&err,"Checkin [%S] does not contain file: " |
| 3750 | "<code>%h</code>", zRevResolved, zFilename)); |
| 3751 | } |
| 3752 | frid = fast_uuid_to_rid(zFileUuid); |
| 3753 | assert(frid); |
| 3754 | |
| 3755 | /* Read file content from submit request or repo... */ |
| @@ -3757,12 +3759,12 @@ | |
| 3759 | ? blob_str(&cimi.fileContent) : NULL; |
| 3760 | }else{ |
| 3761 | blob_init(&cimi.fileContent,zContent,-1); |
| 3762 | } |
| 3763 | if(looks_like_binary(&cimi.fileContent)){ |
| 3764 | fail((&err,"File appears to be binary. Cannot edit: " |
| 3765 | "<code>%h</code>",zFilename)); |
| 3766 | } |
| 3767 | |
| 3768 | /* All set. Here we go... */ |
| 3769 | #define fp fossil_print |
| 3770 | /* ^^^ Appologies, Richard, but the @ form plays havoc with emacs */ |
| @@ -3988,11 +3990,11 @@ | |
| 3990 | fossil_free(zFileUuid); |
| 3991 | if(stmt.pStmt){ |
| 3992 | db_finalize(&stmt); |
| 3993 | } |
| 3994 | if(blob_size(&err)){ |
| 3995 | fp("<div class='fileedit-error-report'>%s</div>", |
| 3996 | blob_str(&err)); |
| 3997 | } |
| 3998 | blob_reset(&err); |
| 3999 | CheckinMiniInfo_cleanup(&cimi); |
| 4000 | if(blob_size(&endScript)>0){ |
| 4001 |