Fossil SCM

Let the "-limit" option in "fossil tag find" be handled exactly the same as in "fossil timeline". This allows output of more than 2000 lines if the "-limit" parameter requests so.

jan.nijtmans 2013-10-21 08:23 UTC trunk
Commit 1f77efc32140c95cf052f8a0d123c768fffaa892
1 file changed +2 -2
+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) : -20;
395395
396396
db_find_and_open_repository(0, 0);
397397
if( g.argc<3 ){
398398
goto tag_cmd_usage;
399399
}
@@ -472,11 +472,11 @@
472472
if(nFindLimit>0){
473473
blob_appendf(&sql, " LIMIT %d", nFindLimit);
474474
}
475475
db_prepare(&q, "%s", blob_str(&sql));
476476
blob_reset(&sql);
477
- print_timeline(&q, 2000, 0);
477
+ print_timeline(&q, nFindLimit<0?-nFindLimit:0, 0);
478478
db_finalize(&q);
479479
}
480480
}
481481
}else
482482
483483
--- 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 }
@@ -472,11 +472,11 @@
472 if(nFindLimit>0){
473 blob_appendf(&sql, " LIMIT %d", nFindLimit);
474 }
475 db_prepare(&q, "%s", blob_str(&sql));
476 blob_reset(&sql);
477 print_timeline(&q, 2000, 0);
478 db_finalize(&q);
479 }
480 }
481 }else
482
483
--- 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) : -20;
395
396 db_find_and_open_repository(0, 0);
397 if( g.argc<3 ){
398 goto tag_cmd_usage;
399 }
@@ -472,11 +472,11 @@
472 if(nFindLimit>0){
473 blob_appendf(&sql, " LIMIT %d", nFindLimit);
474 }
475 db_prepare(&q, "%s", blob_str(&sql));
476 blob_reset(&sql);
477 print_timeline(&q, nFindLimit<0?-nFindLimit:0, 0);
478 db_finalize(&q);
479 }
480 }
481 }else
482
483

Keyboard Shortcuts

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