Fossil SCM

Fix existing print_timeline() calls, so they return the same output as trunk by default.

jan.nijtmans 2013-10-29 12:58 UTC timeline_cmd_dash_n_fix
Commit 11634df5ea4146970807675979bc18a54d1234b9
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329329
"%s"
330330
" AND event.objid IN (SELECT rid FROM leaves)"
331331
" ORDER BY event.mtime DESC",
332332
timeline_query_for_tty()
333333
);
334
- print_timeline(&q, 20, 79, 0);
334
+ print_timeline(&q, -20, 79, 0);
335335
db_finalize(&q);
336336
}
337337
338338
/*
339339
** COMMAND: leaves*
340340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, 20, 79, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, -20, 79, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
+2 -2
--- src/search.c
+++ src/search.c
@@ -189,11 +189,11 @@
189189
int iBest;
190190
char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
191191
off the end of the
192192
results. */
193193
char const * zLimit = find_option("limit","n",1);
194
- int const nLimit = zLimit ? atoi(zLimit) : -20; /* Max number of matching
194
+ int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching
195195
lines/entries to list */
196196
197197
db_must_be_within_tree();
198198
if( g.argc<2 ) return;
199199
blob_init(&pattern, g.argv[2], -1);
@@ -222,8 +222,8 @@
222222
blob_appendf(&sql,"AND x>%d ", iBest/3);
223223
}
224224
blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225225
db_prepare(&q, blob_str(&sql));
226226
blob_reset(&sql);
227
- print_timeline(&q, 1000, 79, 0);
227
+ print_timeline(&q, nLimit, 79, 0);
228228
db_finalize(&q);
229229
}
230230
--- src/search.c
+++ src/search.c
@@ -189,11 +189,11 @@
189 int iBest;
190 char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
191 off the end of the
192 results. */
193 char const * zLimit = find_option("limit","n",1);
194 int const nLimit = zLimit ? atoi(zLimit) : -20; /* Max number of matching
195 lines/entries to list */
196
197 db_must_be_within_tree();
198 if( g.argc<2 ) return;
199 blob_init(&pattern, g.argv[2], -1);
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, 1000, 79, 0);
228 db_finalize(&q);
229 }
230
--- src/search.c
+++ src/search.c
@@ -189,11 +189,11 @@
189 int iBest;
190 char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
191 off the end of the
192 results. */
193 char const * zLimit = find_option("limit","n",1);
194 int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching
195 lines/entries to list */
196
197 db_must_be_within_tree();
198 if( g.argc<2 ) return;
199 blob_init(&pattern, g.argv[2], -1);
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, nLimit, 79, 0);
228 db_finalize(&q);
229 }
230
+2 -2
--- src/tag.c
+++ src/tag.c
@@ -389,11 +389,11 @@
389389
int n;
390390
int fRaw = find_option("raw","",0)!=0;
391391
int fPropagate = find_option("propagate","",0)!=0;
392392
const char *zPrefix = fRaw ? "" : "sym-";
393393
char const * zFindLimit = find_option("limit","n",1);
394
- int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0;
394
+ int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000;
395395
396396
db_find_and_open_repository(0, 0);
397397
if( g.argc<3 ){
398398
goto tag_cmd_usage;
399399
}
@@ -469,11 +469,11 @@
469469
" ORDER BY event.mtime DESC",
470470
timeline_query_for_tty(), zType, tagid
471471
);
472472
db_prepare(&q, "%s", blob_str(&sql));
473473
blob_reset(&sql);
474
- print_timeline(&q, 2000, 79, 0);
474
+ print_timeline(&q, nFindLimit, 79, 0);
475475
db_finalize(&q);
476476
}
477477
}
478478
}else
479479
480480
--- src/tag.c
+++ src/tag.c
@@ -389,11 +389,11 @@
389 int n;
390 int fRaw = find_option("raw","",0)!=0;
391 int fPropagate = find_option("propagate","",0)!=0;
392 const char *zPrefix = fRaw ? "" : "sym-";
393 char const * zFindLimit = find_option("limit","n",1);
394 int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0;
395
396 db_find_and_open_repository(0, 0);
397 if( g.argc<3 ){
398 goto tag_cmd_usage;
399 }
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, 2000, 79, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
--- src/tag.c
+++ src/tag.c
@@ -389,11 +389,11 @@
389 int n;
390 int fRaw = find_option("raw","",0)!=0;
391 int fPropagate = find_option("propagate","",0)!=0;
392 const char *zPrefix = fRaw ? "" : "sym-";
393 char const * zFindLimit = find_option("limit","n",1);
394 int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000;
395
396 db_find_and_open_repository(0, 0);
397 if( g.argc<3 ){
398 goto tag_cmd_usage;
399 }
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, nFindLimit, 79, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
+1 -1
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188188
"%s "
189189
" AND event.objid IN leaves"
190190
" ORDER BY event.mtime DESC",
191191
timeline_query_for_tty()
192192
);
193
- print_timeline(&q, 100, 79, 0);
193
+ print_timeline(&q, -100, 79, 0);
194194
db_finalize(&q);
195195
fossil_fatal("Multiple descendants");
196196
}
197197
}
198198
tid = db_int(0, "SELECT rid FROM leaves, event"
199199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, 100, 79, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, -100, 79, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199

Keyboard Shortcuts

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