Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch unversioned-files Excluding Merge-Ins
This is equivalent to a diff from c8289bdc to 83c7571f
2016-08-17
| ||
15:42 | Add support for unversioned files stored in the repository. (check-in: 27d743e7 user: drh tags: trunk) | |
15:36 | Show the number and total size of unversioned files on the /stat page. Add a link to /uvlist from /sitemap. (Closed-Leaf check-in: 83c7571f user: drh tags: unversioned-files) | |
14:40 | Update the sync protocol documentation to describe the unversioned file sync. (check-in: d7809493 user: drh tags: unversioned-files) | |
2016-08-16
| ||
20:49 | Merge trunk changes. (check-in: 78ccf4bc user: drh tags: unversioned-files) | |
20:48 | Add the -nocomplain option to the TH1 "query" command. Add the ability to query the unversioned table, if such a table exists. (check-in: c8289bdc user: drh tags: trunk) | |
17:25 | Add the /setup_ucap_list built-in documentation page. Improvements to the /setup_ulist_notes built-in documentation page. (check-in: 70d898fe user: drh tags: trunk) | |
Changes to src/blob.c.
︙ | |||
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + | /* ** Return true if the blob contains a valid UUID_SIZE-digit base16 identifier. */ int blob_is_uuid(Blob *pBlob){ return blob_size(pBlob)==UUID_SIZE && validate16(blob_buffer(pBlob), UUID_SIZE); } /* ** Return true if the blob contains a valid filename */ int blob_is_filename(Blob *pBlob){ return file_is_simple_pathname(blob_str(pBlob), 1); } /* ** Return true if the blob contains a valid 32-bit integer. Store ** the integer value in *pValue. */ int blob_is_int(Blob *pBlob, int *pValue){ const char *z = blob_buffer(pBlob); int i, n, c, v; n = blob_size(pBlob); v = 0; for(i=0; i<n && (c = z[i])!=0 && c>='0' && c<='9'; i++){ v = v*10 + c - '0'; } if( i==n ){ *pValue = v; return 1; }else{ return 0; } } /* ** Return true if the blob contains a valid 64-bit integer. Store ** the integer value in *pValue. */ int blob_is_int64(Blob *pBlob, sqlite3_int64 *pValue){ const char *z = blob_buffer(pBlob); int i, n, c; sqlite3_int64 v; n = blob_size(pBlob); v = 0; for(i=0; i<n && (c = z[i])!=0 && c>='0' && c<='9'; i++){ v = v*10 + c - '0'; } if( i==n ){ *pValue = v; return 1; |
︙ |
Changes to src/content.c.
︙ | |||
450 451 452 453 454 455 456 457 458 459 460 461 462 463 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | + + + + + + + + + + + + + + | /* ** Turn dephantomization processing on or off. */ void content_enable_dephantomize(int onoff){ ignoreDephantomizations = !onoff; } /* ** Make sure the g.rcvid global variable has been initialized. */ void content_rcvid_init(void){ if( g.rcvid==0 ){ db_multi_exec( "INSERT INTO rcvfrom(uid, mtime, nonce, ipaddr)" "VALUES(%d, julianday('now'), %Q, %Q)", g.userUid, g.zNonce, g.zIpAddr ); g.rcvid = db_last_insert_rowid(); } } /* ** Write content into the database. Return the record ID. If the ** content is already in the database, just return the record ID. ** ** If srcId is specified, then pBlob is delta content from ** the srcId record. srcId might be a phantom. |
︙ | |||
528 529 530 531 532 533 534 | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - + - - - - - - - | }else{ rid = 0; /* No entry with the same UUID currently exists */ markAsUnclustered = 1; } db_finalize(&s1); /* Construct a received-from ID if we do not already have one */ |
︙ |
Changes to src/doc.c.
︙ | |||
520 521 522 523 524 525 526 527 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | + - + | base = i+5; } } blob_append(cgi_output_blob(), &z[base], i-base); } /* ** WEBPAGE: uv ** WEBPAGE: doc |
︙ | |||
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | + + + + + + - - - - - + + + + + + - + + + + - + + + + + + + - + | char *zCheckin = "tip"; /* The check-in holding the document */ int vid = 0; /* Artifact of check-in */ int rid = 0; /* Artifact of file */ int i; /* Loop counter */ Blob filebody; /* Content of the documentation file */ Blob title; /* Document title */ int nMiss = (-1); /* Failed attempts to find the document */ int isUV = g.zPath[0]=='u'; /* True for /uv. False for /doc */ const char *zDfltTitle; static const char *const azSuffix[] = { "index.html", "index.wiki", "index.md" #ifdef FOSSIL_ENABLE_TH1_DOCS , "index.th1" #endif }; login_check_credentials(); if( !g.perm.Read ){ login_needed(g.anon.Read); return; } blob_init(&title, 0, 0); zDfltTitle = isUV ? "" : "Documentation"; db_begin_transaction(); while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){ zName = P("name"); if( isUV ){ i = 0; }else{ |
︙ | |||
643 644 645 646 647 648 649 | 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | + - - - - + + + + + - + - + - + | ** file to the user */ zMime = nMiss==0 ? P("mimetype") : 0; if( zMime==0 ){ zMime = mimetype_from_name(zName); } Th_Store("doc_name", zName); if( vid ){ |
︙ |
Changes to src/login.c.
︙ | |||
1093 1094 1095 1096 1097 1098 1099 | 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 | - + | case 's': p->Setup = 1; /* Fall thru into Admin */ case 'a': p->Admin = p->RdTkt = p->WrTkt = p->Zip = p->RdWiki = p->WrWiki = p->NewWiki = p->ApndWiki = p->Hyperlink = p->Clone = p->NewTkt = p->Password = p->RdAddr = p->TktFmt = p->Attach = p->ApndTkt = p->ModWiki = p->ModTkt = p->Delete = |
︙ | |||
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | + | case 'w': p->WrTkt = p->RdTkt = p->NewTkt = p->ApndTkt = 1; break; case 'c': p->ApndTkt = 1; break; case 'q': p->ModTkt = 1; break; case 't': p->TktFmt = 1; break; case 'b': p->Attach = 1; break; case 'x': p->Private = 1; break; case 'y': p->WrUnver = 1; break; /* The "u" privileges is a little different. It recursively ** inherits all privileges of the user named "reader" */ case 'u': { if( (flags & LOGIN_IGNORE_UV)==0 ){ const char *zUser; zUser = db_text("", "SELECT cap FROM user WHERE login='reader'"); |
︙ |
Changes to src/main.c.
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | + | char WrTkt; /* w: make changes to tickets via web */ char ModTkt; /* q: approve and publish ticket changes (Moderator) */ char Attach; /* b: add attachments */ char TktFmt; /* t: create new ticket report formats */ char RdAddr; /* e: read email addresses or other private data */ char Zip; /* z: download zipped artifact via /zip URL */ char Private; /* x: can send and receive private content */ char WrUnver; /* y: can push unversioned content */ }; #ifdef FOSSIL_ENABLE_TCL /* ** All Tcl related context information is in this structure. This structure ** definition has been copied from and should be kept in sync with the one in ** "th_tcl.c". |
︙ |
Changes to src/main.mk.
︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + | $(SRCDIR)/tar.c \ $(SRCDIR)/th_main.c \ $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/unicode.c \ $(SRCDIR)/unversioned.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/utf8.c \ $(SRCDIR)/util.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ |
︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | + | $(OBJDIR)/tar_.c \ $(OBJDIR)/th_main_.c \ $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/unicode_.c \ $(OBJDIR)/unversioned_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/utf8_.c \ $(OBJDIR)/util_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ |
︙ | |||
410 411 412 413 414 415 416 417 418 419 420 421 422 423 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | + | $(OBJDIR)/tar.o \ $(OBJDIR)/th_main.o \ $(OBJDIR)/timeline.o \ $(OBJDIR)/tkt.o \ $(OBJDIR)/tktsetup.o \ $(OBJDIR)/undo.o \ $(OBJDIR)/unicode.o \ $(OBJDIR)/unversioned.o \ $(OBJDIR)/update.o \ $(OBJDIR)/url.o \ $(OBJDIR)/user.o \ $(OBJDIR)/utf8.o \ $(OBJDIR)/util.o \ $(OBJDIR)/verify.o \ $(OBJDIR)/vfile.o \ |
︙ | |||
686 687 688 689 690 691 692 693 694 695 696 697 698 699 | 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | + | $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \ $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \ $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \ $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \ $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \ $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \ $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \ $(OBJDIR)/unversioned_.c:$(OBJDIR)/unversioned.h \ $(OBJDIR)/update_.c:$(OBJDIR)/update.h \ $(OBJDIR)/url_.c:$(OBJDIR)/url.h \ $(OBJDIR)/user_.c:$(OBJDIR)/user.h \ $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \ $(OBJDIR)/util_.c:$(OBJDIR)/util.h \ $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \ $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h \ |
︙ | |||
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 | 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 | + + + + + + + + | $(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/unicode.c >$@ $(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h: $(OBJDIR)/headers $(OBJDIR)/unversioned_.c: $(SRCDIR)/unversioned.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/unversioned.c >$@ $(OBJDIR)/unversioned.o: $(OBJDIR)/unversioned_.c $(OBJDIR)/unversioned.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/unversioned.o -c $(OBJDIR)/unversioned_.c $(OBJDIR)/unversioned.h: $(OBJDIR)/headers $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/update.c >$@ $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/update.o -c $(OBJDIR)/update_.c |
︙ |
Changes to src/makemake.tcl.
︙ | |||
121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | + | tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile |
︙ |
Changes to src/setup.c.
︙ | |||
292 293 294 295 296 297 298 299 300 301 302 303 304 305 | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | + + | @ <tr><th valign="top">v</th> @ <td><i>Developer:</i> Inherit privileges of @ user <tt>developer</tt></td></tr> @ <tr><th valign="top">w</th> @ <td><i>Write-Tkt:</i> Edit tickets</td></tr> @ <tr><th valign="top">x</th> @ <td><i>Private:</i> Push and/or pull private branches</td></tr> @ <tr><th valign="top">y</th> @ <td><i>Write-Unver:</i> Push unversioned files</td></tr> @ <tr><th valign="top">z</th> @ <td><i>Zip download:</i> Download a ZIP archive or tarball</td></tr> @ </table> } /* ** WEBPAGE: setup_ulist_notes |
︙ | |||
712 713 714 715 716 717 718 719 720 721 722 723 724 725 | 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | + + + | @ Moderate Tickets%s(B('q'))</label><br /> @ <label><input type="checkbox" name="at"%s(oa['t']) @ onchange="updateCapabilityString()" /> @ Ticket Report%s(B('t'))</label><br /> @ <label><input type="checkbox" name="ax"%s(oa['x']) @ onchange="updateCapabilityString()" /> @ Private%s(B('x'))</label><br /> @ <label><input type="checkbox" name="ay"%s(oa['y']) @ onchange="updateCapabilityString()" /> @ Write Unverioned%s(B('y'))</label><br /> @ <label><input type="checkbox" name="az"%s(oa['z']) @ onchange="updateCapabilityString()" /> @ Download Zip%s(B('z'))</label> @ </td></tr> @ </table> @ </td> @ </tr> |
︙ |
Changes to src/sitemap.c.
︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + + + | @ <li>%z(href("%R/tktsrch"))Ticket Search</a></li> } @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li> @ <li>%z(href("%R/attachlist"))List of Attachments</a></li> @ </ul> @ </li> } if( g.perm.Read ){ @ <li>%z(href("%R/uvlist"))Unversioned Files</a> } if( srchFlags ){ @ <li>%z(href("%R/search"))Full-Text Search</a></li> } @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li> if( g.perm.Read ){ @ <li>%z(href("%R/stat"))Repository Status</a> @ <ul> |
︙ |
Changes to src/stat.c.
︙ | |||
118 119 120 121 122 123 124 125 126 127 128 129 130 131 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | + + + + + + + + + + + + + + + + + + + + + | fsize /= 10; }else{ b = 1; } a = t/fsize; @ %d(a):%d(b) @ </td></tr> } if( db_table_exists("repository","unversioned") ){ Stmt q; char zStored[100]; db_prepare(&q, "SELECT count(*), sum(sz), sum(length(content))" " FROM unversioned" " WHERE length(hash)>1" ); if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){ sqlite3_int64 iSz, iStored; iSz = db_column_int64(&q,1); iStored = db_column_int64(&q,2); approxSizeName(sizeof(zBuf), zBuf, iSz); approxSizeName(sizeof(zStored), zStored, iStored); @ <tr><th>Unversioned Files:</th><td> @ %z(href("%R/uvlist"))%d(n) files</a>, @ total size %s(zBuf) uncompressed, %s(zStored) compressed @ </td></tr> } db_finalize(&q); } @ <tr><th>Number Of Check-ins:</th><td> n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); @ %d(n) @ </td></tr> @ <tr><th>Number Of Files:</th><td> n = db_int(0, "SELECT count(*) FROM filename /*scan*/"); |
︙ |
Changes to src/sync.c.
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + + + + + + + + + + + + + + + + + + + - - - - - - - + | /* ** This routine processes the command-line argument for push, pull, ** and sync. If a command-line argument is given, that is the URL ** of a server to sync against. If no argument is given, use the ** most recently synced URL. Remember the current URL for next time. */ |
︙ | |||
207 208 209 210 211 212 213 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | */ void pull_cmd(void){ unsigned configFlags = 0; unsigned syncFlags = SYNC_PULL; if( find_option("from-parent-project",0,0)!=0 ){ syncFlags |= SYNC_FROMPARENT; } |
︙ | |||
249 250 251 252 253 254 255 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + | ** to ensure no content is overlooked ** ** See also: clone, config push, pull, remote-url, sync */ void push_cmd(void){ unsigned configFlags = 0; unsigned syncFlags = SYNC_PUSH; |
︙ | |||
294 295 296 297 298 299 300 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | - + + + + + + + + + + + + | ** to ensure no content is overlooked ** ** See also: clone, pull, push, remote-url */ void sync_cmd(void){ unsigned configFlags = 0; unsigned syncFlags = SYNC_PUSH|SYNC_PULL; |
︙ |
Added src/unversioned.c.