Fossil SCM

Fix over-long source lines in checkin.c.

drh 2015-04-28 16:47 trunk
Commit 0b3f184a8c66e8eebfe5ca63636d467156b1517a
1 file changed +16 -8
+16 -8
--- src/checkin.c
+++ src/checkin.c
@@ -65,11 +65,12 @@
6565
6666
db_prepare(&q,
6767
"SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
6868
" FROM vfile "
6969
" 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*/",
7172
blob_sql_text(&where)
7273
);
7374
blob_zero(&rewrittenPathname);
7475
while( db_step(&q)==SQLITE_ROW ){
7576
const char *zPathname = db_column_text(&q,0);
@@ -950,14 +951,16 @@
950951
#else
951952
blob_init(&prompt, zInit, -1);
952953
#endif
953954
blob_append(&prompt,
954955
"\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"
956958
"#\n", -1
957959
);
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());
959962
if( p->zBranch && p->zBranch[0] ){
960963
blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch);
961964
}else{
962965
char *zTags = info_tags_of_checkin(parent_rid, 1);
963966
if( zTags || p->azTag ){
@@ -1042,11 +1045,12 @@
10421045
fossil_warning("fossil knows nothing about: %s", g.argv[ii]);
10431046
result = 1;
10441047
}
10451048
blob_reset(&fname);
10461049
}
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]) );
10481052
for(ii=bag_first(&toCommit); ii>0; ii=bag_next(&toCommit, ii)){
10491053
g.aCommitFile[jj++] = ii;
10501054
}
10511055
g.aCommitFile[jj] = 0;
10521056
bag_clear(&toCommit);
@@ -1270,11 +1274,13 @@
12701274
free(zParentUuid);
12711275
db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
12721276
while( db_step(&q)==SQLITE_ROW ){
12731277
char *zMergeUuid;
12741278
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
+ }
12761282
zMergeUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid);
12771283
if( zMergeUuid ){
12781284
blob_appendf(pOut, " %s", zMergeUuid);
12791285
if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate);
12801286
free(zMergeUuid);
@@ -1381,11 +1387,11 @@
13811387
int fBinary; /* does the blob content appear to be binary? */
13821388
int lookFlags; /* output flags from looks_like_utf8/utf16() */
13831389
int fHasAnyCr; /* the blob contains one or more CR chars */
13841390
int fHasLoneCrOnly; /* all detected line endings are CR only */
13851391
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 */
13871393
char *zMsg; /* Warning message */
13881394
Blob fname; /* Relative pathname of the file */
13891395
static int allOk = 0; /* Set to true to disable this routine */
13901396
13911397
if( allOk ) return 0;
@@ -1460,11 +1466,12 @@
14601466
zWarning = "Unicode";
14611467
zDisable = "\"encoding-glob\" setting";
14621468
}
14631469
file_relative_name(zFilename, &fname, 0);
14641470
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"
14661473
"Commit anyhow (a=all/%sy/N)? ",
14671474
blob_str(&fname), zWarning, zDisable, zConvert);
14681475
prompt_user(zMsg, &ans);
14691476
fossil_free(zMsg);
14701477
cReply = blob_str(&ans)[0];
@@ -1660,11 +1667,12 @@
16601667
sCiInfo.closeFlag = find_option("close",0,0)!=0;
16611668
sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
16621669
sCiInfo.zMimetype = find_option("mimetype",0,1);
16631670
while( (zTag = find_option("tag",0,1))!=0 ){
16641671
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));
16661674
sCiInfo.azTag[nTag++] = zTag;
16671675
sCiInfo.azTag[nTag] = 0;
16681676
}
16691677
zComFile = find_option("message-file", "M", 1);
16701678
if( find_option("private",0,0) ){
16711679
--- 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

Keyboard Shortcuts

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