Fossil

Check-in [adfc1a6b]
Login

Check-in [adfc1a6b]

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

Overview
Comment:Allow optional "-" characters in the huge string argument to bid= on /timeline so that when the hyperlink will have wrap opportunities when pasted into the chat.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: adfc1a6b601d274b09e73b00de93cf49426a829a771deb18d479160f3d9b99ec
User & Date: drh 2022-03-01 17:21:14
Context
2022-03-01
21:02
Ensure that db_open()'s db-is-an-appendvfs-binary check uses canonicalized filenames to avoid the problem reported in forum post 16880a28aad1a868. ... (check-in: ab7ad234 user: stephan tags: trunk)
17:21
Allow optional "-" characters in the huge string argument to bid= on /timeline so that when the hyperlink will have wrap opportunities when pasted into the chat. ... (check-in: adfc1a6b user: drh tags: trunk)
2022-02-28
23:32
Calling db_open() to determine if a given repository is valid rather than a hand-rolled sqlite3_open() call. This then allows us to call db_looks_like_a_repository() to determine if the DB is a valid repo rather than duplicate the checks it already has in another nearby context. This is part of the apndvfs vs normal-case stuff done in prior commits, consolidating the notion of "valid" to a single spot in the code. ... (check-in: 69145d9d user: wyoung tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/bisect.c.

236
237
238
239
240
241
242

243
244
245
246
247
248
249
        " WHERE uuid LIKE '%.*q%%'"
        "   AND EXISTS(SELECT 1 FROM plink WHERE cid=rid)",
        i-1, zDesc+1
      );
      if( rid==0 ) break;
      blob_appendf(&log, "%d", rid);
      zDesc += i;

    }
  }else{
    zLog = db_lget("bisect-log","");
    blob_init(&log, zLog, -1);
  }
  db_multi_exec(
     "CREATE TEMP TABLE bilog("







>







236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
        " WHERE uuid LIKE '%.*q%%'"
        "   AND EXISTS(SELECT 1 FROM plink WHERE cid=rid)",
        i-1, zDesc+1
      );
      if( rid==0 ) break;
      blob_appendf(&log, "%d", rid);
      zDesc += i;
      while( zDesc[0]=='-' ) zDesc++;
    }
  }else{
    zLog = db_lget("bisect-log","");
    blob_init(&log, zLog, -1);
  }
  db_multi_exec(
     "CREATE TEMP TABLE bilog("
325
326
327
328
329
330
331

332
333
334
335
336
337
338
      rid = atoi(blob_str(&id));
      if( rid<0 ){
        cPrefix = 'n';
        rid = -rid;
      }
    }
    zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", rid);

    blob_appendf(&link, "%c%.10s", cPrefix, zUuid);
  }
  zResult = mprintf("%s", blob_str(&link));
  blob_reset(&link);
  blob_reset(&log);
  blob_reset(&id);
  return zResult;







>







326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
      rid = atoi(blob_str(&id));
      if( rid<0 ){
        cPrefix = 'n';
        rid = -rid;
      }
    }
    zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", rid);
    if( blob_size(&link)>0 ) blob_append(&link, "-", 1);
    blob_appendf(&link, "%c%.10s", cPrefix, zUuid);
  }
  zResult = mprintf("%s", blob_str(&link));
  blob_reset(&link);
  blob_reset(&log);
  blob_reset(&id);
  return zResult;