Changes On Branch limit-tag
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch limit-tag Excluding Merge-Ins

This is equivalent to a diff from d7f457b456 to 59da968645

2013-10-24
10:53
Don't set _USE_32BIT_TIME_T when using MSVC++ compiler: On <VS2005 this flag has no effect, and for >=VS2005 the executable links with msvcrt80.dll (or higher), so the fact that localtime64 is missing from msvcrt.dll is no issue there. check-in: 6112b31d8c user: jan.nijtmans tags: trunk
2013-10-22
08:34
Merge updates from trunk. check-in: 0943f37246 user: mistachkin tags: tkt-change-hook
2013-10-21
18:38
merge trunk check-in: 0e4dee009e user: jan.nijtmans tags: timeline_cmd_dash_n_fix
17:00
Merge from trunk. check-in: f3037e1763 user: jan tags: jan-httpsproxytunnel
08:45
Simpler: In raw mode, each entry outputs a single line, so LIMIT can do the job as well. Closed-Leaf check-in: 59da968645 user: jan.nijtmans tags: limit-tag
08:33
The same for raw mode as well. check-in: 4b9be08a4d user: jan.nijtmans tags: limit-tag
08:23
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. check-in: 1f77efc321 user: jan.nijtmans tags: limit-tag
07:41
Fix default "fossil timeline -n" value. Merge trunk, and simplify code makeing use of the trunk improvements. Closed-Leaf check-in: 4fdffd7d3e user: jan.nijtmans tags: timeline_cmd_dash_n_fix-2
06:29
Simplify handling of the limit in print_timeline. check-in: d7f457b456 user: mistachkin tags: trunk
05:06
Make "fossil timeline -n" more accurate in counting lines in verbose mode. Allow print_timeline() to be used without limits, assuming that the query already contains a suitable limitation. Improve documentation. check-in: 0c312bee20 user: jan.nijtmans tags: trunk

Changes to src/tag.c.

387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
*/
void tag_cmd(void){
  int n;
  int fRaw = find_option("raw","",0)!=0;
  int fPropagate = find_option("propagate","",0)!=0;
  const char *zPrefix = fRaw ? "" : "sym-";
  char const * zFindLimit = find_option("limit","n",1);
  int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0;

  db_find_and_open_repository(0, 0);
  if( g.argc<3 ){
    goto tag_cmd_usage;
  }
  n = strlen(g.argv[2]);
  if( n==0 ){







|







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
*/
void tag_cmd(void){
  int n;
  int fRaw = find_option("raw","",0)!=0;
  int fPropagate = find_option("propagate","",0)!=0;
  const char *zPrefix = fRaw ? "" : "sym-";
  char const * zFindLimit = find_option("limit","n",1);
  int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -20;

  db_find_and_open_repository(0, 0);
  if( g.argc<3 ){
    goto tag_cmd_usage;
  }
  n = strlen(g.argv[2]);
  if( n==0 ){
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
      blob_appendf(&sql,
        "SELECT blob.uuid FROM tagxref, blob"
        " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
        "   AND tagxref.tagtype>0"
        "   AND blob.rid=tagxref.rid",
        g.argv[3]
      );
      if(nFindLimit>0){
        blob_appendf(&sql, " LIMIT %d", nFindLimit);
      }
      db_prepare(&q, "%s", blob_str(&sql));
      blob_reset(&sql);
      while( db_step(&q)==SQLITE_ROW ){
        fossil_print("%s\n", db_column_text(&q, 0));
      }
      db_finalize(&q);
    }else{
      int tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",
                         g.argv[3]);
      if( tagid>0 ){







|
|



|







442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
      blob_appendf(&sql,
        "SELECT blob.uuid FROM tagxref, blob"
        " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
        "   AND tagxref.tagtype>0"
        "   AND blob.rid=tagxref.rid",
        g.argv[3]
      );
      if( nFindLimit!=0 ){
        blob_appendf(&sql, " LIMIT %d", nFindLimit<0?-nFindLimit:nFindLimit);
      }
      db_prepare(&q, "%s", blob_str(&sql));
      blob_reset(&sql);
      while( db_step(&q)==SQLITE_ROW){
        fossil_print("%s\n", db_column_text(&q, 0));
      }
      db_finalize(&q);
    }else{
      int tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",
                         g.argv[3]);
      if( tagid>0 ){
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
          timeline_query_for_tty(), zType, tagid
        );
        if(nFindLimit>0){
          blob_appendf(&sql, " LIMIT %d", nFindLimit);
        }
        db_prepare(&q, "%s", blob_str(&sql));
        blob_reset(&sql);
        print_timeline(&q, 2000, 0);
        db_finalize(&q);
      }
    }
  }else

  if( strncmp(g.argv[2],"list",n)==0 ){
    Stmt q;







|







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
          timeline_query_for_tty(), zType, tagid
        );
        if(nFindLimit>0){
          blob_appendf(&sql, " LIMIT %d", nFindLimit);
        }
        db_prepare(&q, "%s", blob_str(&sql));
        blob_reset(&sql);
        print_timeline(&q, nFindLimit<0?-nFindLimit:0, 0);
        db_finalize(&q);
      }
    }
  }else

  if( strncmp(g.argv[2],"list",n)==0 ){
    Stmt q;