Fossil SCM
s/branch_prepare_query/branch_prepare_list_query/g
Commit
267739dd20e2ea4f65f4146d531bbf4716e45def
Parent
14423f32841334b…
2 files changed
+3
-3
+1
-1
+3
-3
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -184,11 +184,11 @@ | ||
| 184 | 184 | ** |
| 185 | 185 | ** If (which<0) then the query pulls only closed branches. If |
| 186 | 186 | ** (which>0) then the query pulls all (closed and opened) |
| 187 | 187 | ** branches. Else the query pulls currently-opened branches. |
| 188 | 188 | */ |
| 189 | -void branch_prepare_query(Stmt *pQuery, int which ){ | |
| 189 | +void branch_prepare_list_query(Stmt *pQuery, int which ){ | |
| 190 | 190 | if( which < 0 ){ |
| 191 | 191 | db_prepare(pQuery, |
| 192 | 192 | "SELECT value FROM tagxref" |
| 193 | 193 | " WHERE tagid=%d AND value NOT NULL " |
| 194 | 194 | "EXCEPT " |
| @@ -264,11 +264,11 @@ | ||
| 264 | 264 | if( g.localOpen ){ |
| 265 | 265 | vid = db_lget_int("checkout", 0); |
| 266 | 266 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 267 | 267 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 268 | 268 | } |
| 269 | - branch_prepare_query(&q, showAll?1:(showClosed?-1:0)); | |
| 269 | + branch_prepare_list_query(&q, showAll?1:(showClosed?-1:0)); | |
| 270 | 270 | while( db_step(&q)==SQLITE_ROW ){ |
| 271 | 271 | const char *zBr = db_column_text(&q, 0); |
| 272 | 272 | int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0; |
| 273 | 273 | fossil_print("%s%s\n", (isCur ? "* " : " "), zBr); |
| 274 | 274 | } |
| @@ -331,11 +331,11 @@ | ||
| 331 | 331 | @ Closed branches are fixed and do not change (unless they are first |
| 332 | 332 | @ reopened)</li> |
| 333 | 333 | @ </ol> |
| 334 | 334 | style_sidebox_end(); |
| 335 | 335 | |
| 336 | - branch_prepare_query(&q, showAll?1:(showClosed?-1:0)); | |
| 336 | + branch_prepare_list_query(&q, showAll?1:(showClosed?-1:0)); | |
| 337 | 337 | cnt = 0; |
| 338 | 338 | while( db_step(&q)==SQLITE_ROW ){ |
| 339 | 339 | const char *zBr = db_column_text(&q, 0); |
| 340 | 340 | if( cnt==0 ){ |
| 341 | 341 | if( colorTest ){ |
| 342 | 342 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -184,11 +184,11 @@ | |
| 184 | ** |
| 185 | ** If (which<0) then the query pulls only closed branches. If |
| 186 | ** (which>0) then the query pulls all (closed and opened) |
| 187 | ** branches. Else the query pulls currently-opened branches. |
| 188 | */ |
| 189 | void branch_prepare_query(Stmt *pQuery, int which ){ |
| 190 | if( which < 0 ){ |
| 191 | db_prepare(pQuery, |
| 192 | "SELECT value FROM tagxref" |
| 193 | " WHERE tagid=%d AND value NOT NULL " |
| 194 | "EXCEPT " |
| @@ -264,11 +264,11 @@ | |
| 264 | if( g.localOpen ){ |
| 265 | vid = db_lget_int("checkout", 0); |
| 266 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 267 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 268 | } |
| 269 | branch_prepare_query(&q, showAll?1:(showClosed?-1:0)); |
| 270 | while( db_step(&q)==SQLITE_ROW ){ |
| 271 | const char *zBr = db_column_text(&q, 0); |
| 272 | int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0; |
| 273 | fossil_print("%s%s\n", (isCur ? "* " : " "), zBr); |
| 274 | } |
| @@ -331,11 +331,11 @@ | |
| 331 | @ Closed branches are fixed and do not change (unless they are first |
| 332 | @ reopened)</li> |
| 333 | @ </ol> |
| 334 | style_sidebox_end(); |
| 335 | |
| 336 | branch_prepare_query(&q, showAll?1:(showClosed?-1:0)); |
| 337 | cnt = 0; |
| 338 | while( db_step(&q)==SQLITE_ROW ){ |
| 339 | const char *zBr = db_column_text(&q, 0); |
| 340 | if( cnt==0 ){ |
| 341 | if( colorTest ){ |
| 342 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -184,11 +184,11 @@ | |
| 184 | ** |
| 185 | ** If (which<0) then the query pulls only closed branches. If |
| 186 | ** (which>0) then the query pulls all (closed and opened) |
| 187 | ** branches. Else the query pulls currently-opened branches. |
| 188 | */ |
| 189 | void branch_prepare_list_query(Stmt *pQuery, int which ){ |
| 190 | if( which < 0 ){ |
| 191 | db_prepare(pQuery, |
| 192 | "SELECT value FROM tagxref" |
| 193 | " WHERE tagid=%d AND value NOT NULL " |
| 194 | "EXCEPT " |
| @@ -264,11 +264,11 @@ | |
| 264 | if( g.localOpen ){ |
| 265 | vid = db_lget_int("checkout", 0); |
| 266 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 267 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 268 | } |
| 269 | branch_prepare_list_query(&q, showAll?1:(showClosed?-1:0)); |
| 270 | while( db_step(&q)==SQLITE_ROW ){ |
| 271 | const char *zBr = db_column_text(&q, 0); |
| 272 | int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0; |
| 273 | fossil_print("%s%s\n", (isCur ? "* " : " "), zBr); |
| 274 | } |
| @@ -331,11 +331,11 @@ | |
| 331 | @ Closed branches are fixed and do not change (unless they are first |
| 332 | @ reopened)</li> |
| 333 | @ </ol> |
| 334 | style_sidebox_end(); |
| 335 | |
| 336 | branch_prepare_list_query(&q, showAll?1:(showClosed?-1:0)); |
| 337 | cnt = 0; |
| 338 | while( db_step(&q)==SQLITE_ROW ){ |
| 339 | const char *zBr = db_column_text(&q, 0); |
| 340 | if( cnt==0 ){ |
| 341 | if( colorTest ){ |
| 342 |
+1
-1
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1596,11 +1596,11 @@ | ||
| 1596 | 1596 | range = "open"; |
| 1597 | 1597 | which = 0; |
| 1598 | 1598 | break; |
| 1599 | 1599 | }; |
| 1600 | 1600 | cson_object_set(pay,"range",cson_value_new_string(range,strlen(range))); |
| 1601 | - branch_prepare_query(&q, which); | |
| 1601 | + branch_prepare_list_query(&q, which); | |
| 1602 | 1602 | cson_object_set(pay,"branches",listV); |
| 1603 | 1603 | while((SQLITE_ROW==db_step(&q))){ |
| 1604 | 1604 | cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0); |
| 1605 | 1605 | if(v){ |
| 1606 | 1606 | cson_array_append(list,v); |
| 1607 | 1607 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1596,11 +1596,11 @@ | |
| 1596 | range = "open"; |
| 1597 | which = 0; |
| 1598 | break; |
| 1599 | }; |
| 1600 | cson_object_set(pay,"range",cson_value_new_string(range,strlen(range))); |
| 1601 | branch_prepare_query(&q, which); |
| 1602 | cson_object_set(pay,"branches",listV); |
| 1603 | while((SQLITE_ROW==db_step(&q))){ |
| 1604 | cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0); |
| 1605 | if(v){ |
| 1606 | cson_array_append(list,v); |
| 1607 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1596,11 +1596,11 @@ | |
| 1596 | range = "open"; |
| 1597 | which = 0; |
| 1598 | break; |
| 1599 | }; |
| 1600 | cson_object_set(pay,"range",cson_value_new_string(range,strlen(range))); |
| 1601 | branch_prepare_list_query(&q, which); |
| 1602 | cson_object_set(pay,"branches",listV); |
| 1603 | while((SQLITE_ROW==db_step(&q))){ |
| 1604 | cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0); |
| 1605 | if(v){ |
| 1606 | cson_array_append(list,v); |
| 1607 |