Fossil SCM
Fix over-long source lines in checkin.c.
Commit
0b3f184a8c66e8eebfe5ca63636d467156b1517a
Parent
eda622cefc8c90f…
1 file changed
+16
-8
+16
-8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -65,11 +65,12 @@ | ||
| 65 | 65 | |
| 66 | 66 | db_prepare(&q, |
| 67 | 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 68 | 68 | " FROM vfile " |
| 69 | 69 | " WHERE is_selected(id) %s" |
| 70 | - " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1 /*scan*/", | |
| 70 | + " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" | |
| 71 | + " ORDER BY 1 /*scan*/", | |
| 71 | 72 | blob_sql_text(&where) |
| 72 | 73 | ); |
| 73 | 74 | blob_zero(&rewrittenPathname); |
| 74 | 75 | while( db_step(&q)==SQLITE_ROW ){ |
| 75 | 76 | const char *zPathname = db_column_text(&q,0); |
| @@ -950,14 +951,16 @@ | ||
| 950 | 951 | #else |
| 951 | 952 | blob_init(&prompt, zInit, -1); |
| 952 | 953 | #endif |
| 953 | 954 | blob_append(&prompt, |
| 954 | 955 | "\n" |
| 955 | - "# Enter a commit message for this check-in. Lines beginning with # are ignored.\n" | |
| 956 | + "# Enter a commit message for this check-in." | |
| 957 | + " Lines beginning with # are ignored.\n" | |
| 956 | 958 | "#\n", -1 |
| 957 | 959 | ); |
| 958 | - blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 960 | + blob_appendf(&prompt, "# user: %s\n", | |
| 961 | + p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 959 | 962 | if( p->zBranch && p->zBranch[0] ){ |
| 960 | 963 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 961 | 964 | }else{ |
| 962 | 965 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 963 | 966 | if( zTags || p->azTag ){ |
| @@ -1042,11 +1045,12 @@ | ||
| 1042 | 1045 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 1043 | 1046 | result = 1; |
| 1044 | 1047 | } |
| 1045 | 1048 | blob_reset(&fname); |
| 1046 | 1049 | } |
| 1047 | - g.aCommitFile = fossil_malloc( (bag_count(&toCommit)+1) * sizeof(g.aCommitFile[0]) ); | |
| 1050 | + g.aCommitFile = fossil_malloc( (bag_count(&toCommit)+1) * | |
| 1051 | + sizeof(g.aCommitFile[0]) ); | |
| 1048 | 1052 | for(ii=bag_first(&toCommit); ii>0; ii=bag_next(&toCommit, ii)){ |
| 1049 | 1053 | g.aCommitFile[jj++] = ii; |
| 1050 | 1054 | } |
| 1051 | 1055 | g.aCommitFile[jj] = 0; |
| 1052 | 1056 | bag_clear(&toCommit); |
| @@ -1270,11 +1274,13 @@ | ||
| 1270 | 1274 | free(zParentUuid); |
| 1271 | 1275 | db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2"); |
| 1272 | 1276 | while( db_step(&q)==SQLITE_ROW ){ |
| 1273 | 1277 | char *zMergeUuid; |
| 1274 | 1278 | int mid = db_column_int(&q, 0); |
| 1275 | - if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue; | |
| 1279 | + if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ){ | |
| 1280 | + continue; | |
| 1281 | + } | |
| 1276 | 1282 | zMergeUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); |
| 1277 | 1283 | if( zMergeUuid ){ |
| 1278 | 1284 | blob_appendf(pOut, " %s", zMergeUuid); |
| 1279 | 1285 | if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate); |
| 1280 | 1286 | free(zMergeUuid); |
| @@ -1381,11 +1387,11 @@ | ||
| 1381 | 1387 | int fBinary; /* does the blob content appear to be binary? */ |
| 1382 | 1388 | int lookFlags; /* output flags from looks_like_utf8/utf16() */ |
| 1383 | 1389 | int fHasAnyCr; /* the blob contains one or more CR chars */ |
| 1384 | 1390 | int fHasLoneCrOnly; /* all detected line endings are CR only */ |
| 1385 | 1391 | int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */ |
| 1386 | - int fHasInvalidUtf8 = 0;/* contains byte-sequence which is invalid for UTF-8 */ | |
| 1392 | + int fHasInvalidUtf8 = 0;/* contains invalid UTF-8 */ | |
| 1387 | 1393 | char *zMsg; /* Warning message */ |
| 1388 | 1394 | Blob fname; /* Relative pathname of the file */ |
| 1389 | 1395 | static int allOk = 0; /* Set to true to disable this routine */ |
| 1390 | 1396 | |
| 1391 | 1397 | if( allOk ) return 0; |
| @@ -1460,11 +1466,12 @@ | ||
| 1460 | 1466 | zWarning = "Unicode"; |
| 1461 | 1467 | zDisable = "\"encoding-glob\" setting"; |
| 1462 | 1468 | } |
| 1463 | 1469 | file_relative_name(zFilename, &fname, 0); |
| 1464 | 1470 | zMsg = mprintf( |
| 1465 | - "%s contains %s. Use --no-warnings or the %s to disable this warning.\n" | |
| 1471 | + "%s contains %s. Use --no-warnings or the %s to" | |
| 1472 | + " disable this warning.\n" | |
| 1466 | 1473 | "Commit anyhow (a=all/%sy/N)? ", |
| 1467 | 1474 | blob_str(&fname), zWarning, zDisable, zConvert); |
| 1468 | 1475 | prompt_user(zMsg, &ans); |
| 1469 | 1476 | fossil_free(zMsg); |
| 1470 | 1477 | cReply = blob_str(&ans)[0]; |
| @@ -1660,11 +1667,12 @@ | ||
| 1660 | 1667 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 1661 | 1668 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 1662 | 1669 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1663 | 1670 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1664 | 1671 | if( zTag[0]==0 ) continue; |
| 1665 | - sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2)); | |
| 1672 | + sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, | |
| 1673 | + sizeof(char*)*(nTag+2)); | |
| 1666 | 1674 | sCiInfo.azTag[nTag++] = zTag; |
| 1667 | 1675 | sCiInfo.azTag[nTag] = 0; |
| 1668 | 1676 | } |
| 1669 | 1677 | zComFile = find_option("message-file", "M", 1); |
| 1670 | 1678 | if( find_option("private",0,0) ){ |
| 1671 | 1679 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -65,11 +65,12 @@ | |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1 /*scan*/", |
| 71 | blob_sql_text(&where) |
| 72 | ); |
| 73 | blob_zero(&rewrittenPathname); |
| 74 | while( db_step(&q)==SQLITE_ROW ){ |
| 75 | const char *zPathname = db_column_text(&q,0); |
| @@ -950,14 +951,16 @@ | |
| 950 | #else |
| 951 | blob_init(&prompt, zInit, -1); |
| 952 | #endif |
| 953 | blob_append(&prompt, |
| 954 | "\n" |
| 955 | "# Enter a commit message for this check-in. Lines beginning with # are ignored.\n" |
| 956 | "#\n", -1 |
| 957 | ); |
| 958 | blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 959 | if( p->zBranch && p->zBranch[0] ){ |
| 960 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 961 | }else{ |
| 962 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 963 | if( zTags || p->azTag ){ |
| @@ -1042,11 +1045,12 @@ | |
| 1042 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 1043 | result = 1; |
| 1044 | } |
| 1045 | blob_reset(&fname); |
| 1046 | } |
| 1047 | g.aCommitFile = fossil_malloc( (bag_count(&toCommit)+1) * sizeof(g.aCommitFile[0]) ); |
| 1048 | for(ii=bag_first(&toCommit); ii>0; ii=bag_next(&toCommit, ii)){ |
| 1049 | g.aCommitFile[jj++] = ii; |
| 1050 | } |
| 1051 | g.aCommitFile[jj] = 0; |
| 1052 | bag_clear(&toCommit); |
| @@ -1270,11 +1274,13 @@ | |
| 1270 | free(zParentUuid); |
| 1271 | db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2"); |
| 1272 | while( db_step(&q)==SQLITE_ROW ){ |
| 1273 | char *zMergeUuid; |
| 1274 | int mid = db_column_int(&q, 0); |
| 1275 | if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue; |
| 1276 | zMergeUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); |
| 1277 | if( zMergeUuid ){ |
| 1278 | blob_appendf(pOut, " %s", zMergeUuid); |
| 1279 | if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate); |
| 1280 | free(zMergeUuid); |
| @@ -1381,11 +1387,11 @@ | |
| 1381 | int fBinary; /* does the blob content appear to be binary? */ |
| 1382 | int lookFlags; /* output flags from looks_like_utf8/utf16() */ |
| 1383 | int fHasAnyCr; /* the blob contains one or more CR chars */ |
| 1384 | int fHasLoneCrOnly; /* all detected line endings are CR only */ |
| 1385 | int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */ |
| 1386 | int fHasInvalidUtf8 = 0;/* contains byte-sequence which is invalid for UTF-8 */ |
| 1387 | char *zMsg; /* Warning message */ |
| 1388 | Blob fname; /* Relative pathname of the file */ |
| 1389 | static int allOk = 0; /* Set to true to disable this routine */ |
| 1390 | |
| 1391 | if( allOk ) return 0; |
| @@ -1460,11 +1466,12 @@ | |
| 1460 | zWarning = "Unicode"; |
| 1461 | zDisable = "\"encoding-glob\" setting"; |
| 1462 | } |
| 1463 | file_relative_name(zFilename, &fname, 0); |
| 1464 | zMsg = mprintf( |
| 1465 | "%s contains %s. Use --no-warnings or the %s to disable this warning.\n" |
| 1466 | "Commit anyhow (a=all/%sy/N)? ", |
| 1467 | blob_str(&fname), zWarning, zDisable, zConvert); |
| 1468 | prompt_user(zMsg, &ans); |
| 1469 | fossil_free(zMsg); |
| 1470 | cReply = blob_str(&ans)[0]; |
| @@ -1660,11 +1667,12 @@ | |
| 1660 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 1661 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 1662 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1663 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1664 | if( zTag[0]==0 ) continue; |
| 1665 | sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2)); |
| 1666 | sCiInfo.azTag[nTag++] = zTag; |
| 1667 | sCiInfo.azTag[nTag] = 0; |
| 1668 | } |
| 1669 | zComFile = find_option("message-file", "M", 1); |
| 1670 | if( find_option("private",0,0) ){ |
| 1671 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -65,11 +65,12 @@ | |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| 73 | ); |
| 74 | blob_zero(&rewrittenPathname); |
| 75 | while( db_step(&q)==SQLITE_ROW ){ |
| 76 | const char *zPathname = db_column_text(&q,0); |
| @@ -950,14 +951,16 @@ | |
| 951 | #else |
| 952 | blob_init(&prompt, zInit, -1); |
| 953 | #endif |
| 954 | blob_append(&prompt, |
| 955 | "\n" |
| 956 | "# Enter a commit message for this check-in." |
| 957 | " Lines beginning with # are ignored.\n" |
| 958 | "#\n", -1 |
| 959 | ); |
| 960 | blob_appendf(&prompt, "# user: %s\n", |
| 961 | p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 962 | if( p->zBranch && p->zBranch[0] ){ |
| 963 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 964 | }else{ |
| 965 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 966 | if( zTags || p->azTag ){ |
| @@ -1042,11 +1045,12 @@ | |
| 1045 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 1046 | result = 1; |
| 1047 | } |
| 1048 | blob_reset(&fname); |
| 1049 | } |
| 1050 | g.aCommitFile = fossil_malloc( (bag_count(&toCommit)+1) * |
| 1051 | sizeof(g.aCommitFile[0]) ); |
| 1052 | for(ii=bag_first(&toCommit); ii>0; ii=bag_next(&toCommit, ii)){ |
| 1053 | g.aCommitFile[jj++] = ii; |
| 1054 | } |
| 1055 | g.aCommitFile[jj] = 0; |
| 1056 | bag_clear(&toCommit); |
| @@ -1270,11 +1274,13 @@ | |
| 1274 | free(zParentUuid); |
| 1275 | db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2"); |
| 1276 | while( db_step(&q)==SQLITE_ROW ){ |
| 1277 | char *zMergeUuid; |
| 1278 | int mid = db_column_int(&q, 0); |
| 1279 | if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ){ |
| 1280 | continue; |
| 1281 | } |
| 1282 | zMergeUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); |
| 1283 | if( zMergeUuid ){ |
| 1284 | blob_appendf(pOut, " %s", zMergeUuid); |
| 1285 | if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate); |
| 1286 | free(zMergeUuid); |
| @@ -1381,11 +1387,11 @@ | |
| 1387 | int fBinary; /* does the blob content appear to be binary? */ |
| 1388 | int lookFlags; /* output flags from looks_like_utf8/utf16() */ |
| 1389 | int fHasAnyCr; /* the blob contains one or more CR chars */ |
| 1390 | int fHasLoneCrOnly; /* all detected line endings are CR only */ |
| 1391 | int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */ |
| 1392 | int fHasInvalidUtf8 = 0;/* contains invalid UTF-8 */ |
| 1393 | char *zMsg; /* Warning message */ |
| 1394 | Blob fname; /* Relative pathname of the file */ |
| 1395 | static int allOk = 0; /* Set to true to disable this routine */ |
| 1396 | |
| 1397 | if( allOk ) return 0; |
| @@ -1460,11 +1466,12 @@ | |
| 1466 | zWarning = "Unicode"; |
| 1467 | zDisable = "\"encoding-glob\" setting"; |
| 1468 | } |
| 1469 | file_relative_name(zFilename, &fname, 0); |
| 1470 | zMsg = mprintf( |
| 1471 | "%s contains %s. Use --no-warnings or the %s to" |
| 1472 | " disable this warning.\n" |
| 1473 | "Commit anyhow (a=all/%sy/N)? ", |
| 1474 | blob_str(&fname), zWarning, zDisable, zConvert); |
| 1475 | prompt_user(zMsg, &ans); |
| 1476 | fossil_free(zMsg); |
| 1477 | cReply = blob_str(&ans)[0]; |
| @@ -1660,11 +1667,12 @@ | |
| 1667 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 1668 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 1669 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1670 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1671 | if( zTag[0]==0 ) continue; |
| 1672 | sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, |
| 1673 | sizeof(char*)*(nTag+2)); |
| 1674 | sCiInfo.azTag[nTag++] = zTag; |
| 1675 | sCiInfo.azTag[nTag] = 0; |
| 1676 | } |
| 1677 | zComFile = find_option("message-file", "M", 1); |
| 1678 | if( find_option("private",0,0) ){ |
| 1679 |