Fossil

Check-in [11634df5]
Login

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

Overview
Comment:Fix existing print_timeline() calls, so they return the same output as trunk by default.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | timeline_cmd_dash_n_fix
Files: files | file ages | folders
SHA1:11634df5ea4146970807675979bc18a54d1234b9
User & Date: jan.nijtmans 2013-10-29 12:58:55
Context
2013-10-29
13:09
merge trunk Closed-Leaf check-in: 055245ad user: jan.nijtmans tags: timeline_cmd_dash_n_fix
12:58
Fix existing print_timeline() calls, so they return the same output as trunk by default. check-in: 11634df5 user: jan.nijtmans tags: timeline_cmd_dash_n_fix
11:10
correct merge conflict check-in: 0cb3ab79 user: jan.nijtmans tags: timeline_cmd_dash_n_fix
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/descendants.c.

   327    327     compute_leaves(base, 0);
   328    328     db_prepare(&q,
   329    329       "%s"
   330    330       "   AND event.objid IN (SELECT rid FROM leaves)"
   331    331       " ORDER BY event.mtime DESC",
   332    332       timeline_query_for_tty()
   333    333     );
   334         -  print_timeline(&q, 20, 79, 0);
          334  +  print_timeline(&q, -20, 79, 0);
   335    335     db_finalize(&q);
   336    336   }
   337    337   
   338    338   /*
   339    339   ** COMMAND: leaves*
   340    340   **
   341    341   ** Usage: %fossil leaves ?OPTIONS?

Changes to src/search.c.

   187    187     Blob sql = empty_blob;
   188    188     Stmt q;
   189    189     int iBest;
   190    190     char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
   191    191                                                        off the end of the
   192    192                                                        results. */
   193    193     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
   195    195                                                      lines/entries to list */
   196    196   
   197    197     db_must_be_within_tree();
   198    198     if( g.argc<2 ) return;
   199    199     blob_init(&pattern, g.argv[2], -1);
   200    200     for(i=3; i<g.argc; i++){
   201    201       blob_appendf(&pattern, " %s", g.argv[i]);
................................................................................
   220    220                 "WHERE 1 ", -1);
   221    221     if(!fAll){
   222    222       blob_appendf(&sql,"AND x>%d ", iBest/3);
   223    223     }
   224    224     blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
   225    225     db_prepare(&q, blob_str(&sql));
   226    226     blob_reset(&sql);
   227         -  print_timeline(&q, 1000, 79, 0);
          227  +  print_timeline(&q, nLimit, 79, 0);
   228    228     db_finalize(&q);
   229    229   }

Changes to src/tag.c.

   387    387   */
   388    388   void tag_cmd(void){
   389    389     int n;
   390    390     int fRaw = find_option("raw","",0)!=0;
   391    391     int fPropagate = find_option("propagate","",0)!=0;
   392    392     const char *zPrefix = fRaw ? "" : "sym-";
   393    393     char const * zFindLimit = find_option("limit","n",1);
   394         -  int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0;
          394  +  int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000;
   395    395   
   396    396     db_find_and_open_repository(0, 0);
   397    397     if( g.argc<3 ){
   398    398       goto tag_cmd_usage;
   399    399     }
   400    400     n = strlen(g.argv[2]);
   401    401     if( n==0 ){
................................................................................
   467    467                       "  WHERE tagtype>0 AND tagid=%d"
   468    468                       ")"
   469    469             " ORDER BY event.mtime DESC",
   470    470             timeline_query_for_tty(), zType, tagid
   471    471           );
   472    472           db_prepare(&q, "%s", blob_str(&sql));
   473    473           blob_reset(&sql);
   474         -        print_timeline(&q, 2000, 79, 0);
          474  +        print_timeline(&q, nFindLimit, 79, 0);
   475    475           db_finalize(&q);
   476    476         }
   477    477       }
   478    478     }else
   479    479   
   480    480     if( strncmp(g.argv[2],"list",n)==0 ){
   481    481       Stmt q;

Changes to src/update.c.

   186    186           compute_leaves(vid, closeCode);
   187    187           db_prepare(&q, 
   188    188             "%s "
   189    189             "   AND event.objid IN leaves"
   190    190             " ORDER BY event.mtime DESC",
   191    191             timeline_query_for_tty()
   192    192           );
   193         -        print_timeline(&q, 100, 79, 0);
          193  +        print_timeline(&q, -100, 79, 0);
   194    194           db_finalize(&q);
   195    195           fossil_fatal("Multiple descendants");
   196    196         }
   197    197       }
   198    198       tid = db_int(0, "SELECT rid FROM leaves, event"
   199    199                       " WHERE event.objid=leaves.rid"
   200    200                       " ORDER BY event.mtime DESC");