Fossil SCM
Remove unnecessary spaces at end-of-lines. No change in functionality.
Commit
3df526ca41bde7564178db3a8ea408e50d631f36
Parent
81162e791fb31bc…
9 files changed
+3
-3
+4
-4
+32
-32
+8
-8
+3
-3
+9
-9
+7
-7
+20
-20
+31
-31
+3
-3
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -157,11 +157,11 @@ | ||
| 157 | 157 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 158 | 158 | file_delete(zManFile); |
| 159 | 159 | free(zManFile); |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - | |
| 162 | + | |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /* |
| 166 | 166 | ** COMMAND: checkout* |
| 167 | 167 | ** COMMAND: co* |
| @@ -175,11 +175,11 @@ | ||
| 175 | 175 | ** leaves files on disk unchanged, except the manifest and manifest.uuid |
| 176 | 176 | ** files. |
| 177 | 177 | ** |
| 178 | 178 | ** The --latest flag can be used in place of VERSION to checkout the |
| 179 | 179 | ** latest version in the repository. |
| 180 | -** | |
| 180 | +** | |
| 181 | 181 | ** Options: |
| 182 | 182 | ** --force Ignore edited files in the current checkout |
| 183 | 183 | ** --keep Only update the manifest and manifest.uuid files |
| 184 | 184 | ** |
| 185 | 185 | ** See also: update |
| @@ -190,11 +190,11 @@ | ||
| 190 | 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | 191 | char *zVers; /* Version to checkout */ |
| 192 | 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | 193 | int vid, prior; |
| 194 | 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | - | |
| 195 | + | |
| 196 | 196 | db_must_be_within_tree(); |
| 197 | 197 | db_begin_transaction(); |
| 198 | 198 | forceFlag = find_option("force","f",0)!=0; |
| 199 | 199 | keepFlag = find_option("keep",0,0)!=0; |
| 200 | 200 | latestFlag = find_option("latest",0,0)!=0; |
| 201 | 201 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -157,11 +157,11 @@ | |
| 157 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 158 | file_delete(zManFile); |
| 159 | free(zManFile); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | } |
| 164 | |
| 165 | /* |
| 166 | ** COMMAND: checkout* |
| 167 | ** COMMAND: co* |
| @@ -175,11 +175,11 @@ | |
| 175 | ** leaves files on disk unchanged, except the manifest and manifest.uuid |
| 176 | ** files. |
| 177 | ** |
| 178 | ** The --latest flag can be used in place of VERSION to checkout the |
| 179 | ** latest version in the repository. |
| 180 | ** |
| 181 | ** Options: |
| 182 | ** --force Ignore edited files in the current checkout |
| 183 | ** --keep Only update the manifest and manifest.uuid files |
| 184 | ** |
| 185 | ** See also: update |
| @@ -190,11 +190,11 @@ | |
| 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | char *zVers; /* Version to checkout */ |
| 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | int vid, prior; |
| 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | |
| 196 | db_must_be_within_tree(); |
| 197 | db_begin_transaction(); |
| 198 | forceFlag = find_option("force","f",0)!=0; |
| 199 | keepFlag = find_option("keep",0,0)!=0; |
| 200 | latestFlag = find_option("latest",0,0)!=0; |
| 201 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -157,11 +157,11 @@ | |
| 157 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 158 | file_delete(zManFile); |
| 159 | free(zManFile); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | } |
| 164 | |
| 165 | /* |
| 166 | ** COMMAND: checkout* |
| 167 | ** COMMAND: co* |
| @@ -175,11 +175,11 @@ | |
| 175 | ** leaves files on disk unchanged, except the manifest and manifest.uuid |
| 176 | ** files. |
| 177 | ** |
| 178 | ** The --latest flag can be used in place of VERSION to checkout the |
| 179 | ** latest version in the repository. |
| 180 | ** |
| 181 | ** Options: |
| 182 | ** --force Ignore edited files in the current checkout |
| 183 | ** --keep Only update the manifest and manifest.uuid files |
| 184 | ** |
| 185 | ** See also: update |
| @@ -190,11 +190,11 @@ | |
| 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | char *zVers; /* Version to checkout */ |
| 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | int vid, prior; |
| 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | |
| 196 | db_must_be_within_tree(); |
| 197 | db_begin_transaction(); |
| 198 | forceFlag = find_option("force","f",0)!=0; |
| 199 | keepFlag = find_option("keep",0,0)!=0; |
| 200 | latestFlag = find_option("latest",0,0)!=0; |
| 201 |
+4
-4
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1305,11 +1305,11 @@ | ||
| 1305 | 1305 | sbsWriteMarker(&s, " ", ""); |
| 1306 | 1306 | sbsWriteLineno(&s, b+j, SBS_LNB); |
| 1307 | 1307 | sbsWriteText(&s, &B[b+j], SBS_TXTB); |
| 1308 | 1308 | } |
| 1309 | 1309 | } |
| 1310 | - | |
| 1310 | + | |
| 1311 | 1311 | if( s.escHtml && blob_size(s.apCols[SBS_LNA])>0 ){ |
| 1312 | 1312 | blob_append(pOut, "<table class=\"sbsdiffcols\"><tr>\n", -1); |
| 1313 | 1313 | for(i=SBS_LNA; i<=SBS_TXTB; i++){ |
| 1314 | 1314 | sbsWriteColumn(pOut, s.apCols[i], i); |
| 1315 | 1315 | blob_reset(s.apCols[i]); |
| @@ -2140,11 +2140,11 @@ | ||
| 2140 | 2140 | void annotation_page(void){ |
| 2141 | 2141 | int mid; |
| 2142 | 2142 | int fnid; |
| 2143 | 2143 | int i; |
| 2144 | 2144 | int iLimit; /* Depth limit */ |
| 2145 | - int annFlags = ANN_FILE_ANCEST; | |
| 2145 | + int annFlags = ANN_FILE_ANCEST; | |
| 2146 | 2146 | int showLog = 0; /* True to display the log */ |
| 2147 | 2147 | const char *zFilename; /* Name of file to annotate */ |
| 2148 | 2148 | const char *zCI; /* The check-in containing zFilename */ |
| 2149 | 2149 | Annotator ann; |
| 2150 | 2150 | HQuery url; |
| @@ -2208,11 +2208,11 @@ | ||
| 2208 | 2208 | clr2 = 0xb5e0ff; /* Older changes: blue (cold) */ |
| 2209 | 2209 | } |
| 2210 | 2210 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2211 | 2211 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2212 | 2212 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2213 | - } | |
| 2213 | + } | |
| 2214 | 2214 | |
| 2215 | 2215 | if( showLog ){ |
| 2216 | 2216 | char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI); |
| 2217 | 2217 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2218 | 2218 | @ <ol> |
| @@ -2238,11 +2238,11 @@ | ||
| 2238 | 2238 | } |
| 2239 | 2239 | @ </ol> |
| 2240 | 2240 | @ <hr> |
| 2241 | 2241 | } |
| 2242 | 2242 | if( !ann.bLimit ){ |
| 2243 | - @ <h2>Origin for each line in | |
| 2243 | + @ <h2>Origin for each line in | |
| 2244 | 2244 | @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> |
| 2245 | 2245 | @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> |
| 2246 | 2246 | iLimit = ann.nVers+10; |
| 2247 | 2247 | }else{ |
| 2248 | 2248 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2249 | 2249 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1305,11 +1305,11 @@ | |
| 1305 | sbsWriteMarker(&s, " ", ""); |
| 1306 | sbsWriteLineno(&s, b+j, SBS_LNB); |
| 1307 | sbsWriteText(&s, &B[b+j], SBS_TXTB); |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | if( s.escHtml && blob_size(s.apCols[SBS_LNA])>0 ){ |
| 1312 | blob_append(pOut, "<table class=\"sbsdiffcols\"><tr>\n", -1); |
| 1313 | for(i=SBS_LNA; i<=SBS_TXTB; i++){ |
| 1314 | sbsWriteColumn(pOut, s.apCols[i], i); |
| 1315 | blob_reset(s.apCols[i]); |
| @@ -2140,11 +2140,11 @@ | |
| 2140 | void annotation_page(void){ |
| 2141 | int mid; |
| 2142 | int fnid; |
| 2143 | int i; |
| 2144 | int iLimit; /* Depth limit */ |
| 2145 | int annFlags = ANN_FILE_ANCEST; |
| 2146 | int showLog = 0; /* True to display the log */ |
| 2147 | const char *zFilename; /* Name of file to annotate */ |
| 2148 | const char *zCI; /* The check-in containing zFilename */ |
| 2149 | Annotator ann; |
| 2150 | HQuery url; |
| @@ -2208,11 +2208,11 @@ | |
| 2208 | clr2 = 0xb5e0ff; /* Older changes: blue (cold) */ |
| 2209 | } |
| 2210 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2211 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2212 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2213 | } |
| 2214 | |
| 2215 | if( showLog ){ |
| 2216 | char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI); |
| 2217 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2218 | @ <ol> |
| @@ -2238,11 +2238,11 @@ | |
| 2238 | } |
| 2239 | @ </ol> |
| 2240 | @ <hr> |
| 2241 | } |
| 2242 | if( !ann.bLimit ){ |
| 2243 | @ <h2>Origin for each line in |
| 2244 | @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> |
| 2245 | @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> |
| 2246 | iLimit = ann.nVers+10; |
| 2247 | }else{ |
| 2248 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2249 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1305,11 +1305,11 @@ | |
| 1305 | sbsWriteMarker(&s, " ", ""); |
| 1306 | sbsWriteLineno(&s, b+j, SBS_LNB); |
| 1307 | sbsWriteText(&s, &B[b+j], SBS_TXTB); |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | if( s.escHtml && blob_size(s.apCols[SBS_LNA])>0 ){ |
| 1312 | blob_append(pOut, "<table class=\"sbsdiffcols\"><tr>\n", -1); |
| 1313 | for(i=SBS_LNA; i<=SBS_TXTB; i++){ |
| 1314 | sbsWriteColumn(pOut, s.apCols[i], i); |
| 1315 | blob_reset(s.apCols[i]); |
| @@ -2140,11 +2140,11 @@ | |
| 2140 | void annotation_page(void){ |
| 2141 | int mid; |
| 2142 | int fnid; |
| 2143 | int i; |
| 2144 | int iLimit; /* Depth limit */ |
| 2145 | int annFlags = ANN_FILE_ANCEST; |
| 2146 | int showLog = 0; /* True to display the log */ |
| 2147 | const char *zFilename; /* Name of file to annotate */ |
| 2148 | const char *zCI; /* The check-in containing zFilename */ |
| 2149 | Annotator ann; |
| 2150 | HQuery url; |
| @@ -2208,11 +2208,11 @@ | |
| 2208 | clr2 = 0xb5e0ff; /* Older changes: blue (cold) */ |
| 2209 | } |
| 2210 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2211 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2212 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2213 | } |
| 2214 | |
| 2215 | if( showLog ){ |
| 2216 | char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI); |
| 2217 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2218 | @ <ol> |
| @@ -2238,11 +2238,11 @@ | |
| 2238 | } |
| 2239 | @ </ol> |
| 2240 | @ <hr> |
| 2241 | } |
| 2242 | if( !ann.bLimit ){ |
| 2243 | @ <h2>Origin for each line in |
| 2244 | @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> |
| 2245 | @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> |
| 2246 | iLimit = ann.nVers+10; |
| 2247 | }else{ |
| 2248 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2249 |
+32
-32
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -610,11 +610,11 @@ | ||
| 610 | 610 | /* A Tcl/Tk script used to render diff output. |
| 611 | 611 | */ |
| 612 | 612 | static const char zDiffScript[] = |
| 613 | 613 | @ set prog { |
| 614 | 614 | @ package require Tk |
| 615 | -@ | |
| 615 | +@ | |
| 616 | 616 | @ array set CFG { |
| 617 | 617 | @ TITLE {Fossil Diff} |
| 618 | 618 | @ LN_COL_BG #dddddd |
| 619 | 619 | @ LN_COL_FG #444444 |
| 620 | 620 | @ TXT_COL_BG #ffffff |
| @@ -633,38 +633,38 @@ | ||
| 633 | 633 | @ PADX 5 |
| 634 | 634 | @ WIDTH 80 |
| 635 | 635 | @ HEIGHT 45 |
| 636 | 636 | @ LB_HEIGHT 25 |
| 637 | 637 | @ } |
| 638 | -@ | |
| 638 | +@ | |
| 639 | 639 | @ if {![namespace exists ttk]} { |
| 640 | 640 | @ interp alias {} ::ttk::scrollbar {} ::scrollbar |
| 641 | 641 | @ interp alias {} ::ttk::menubutton {} ::menubutton |
| 642 | 642 | @ } |
| 643 | -@ | |
| 643 | +@ | |
| 644 | 644 | @ proc dehtml {x} { |
| 645 | 645 | @ set x [regsub -all {<[^>]*>} $x {}] |
| 646 | 646 | @ return [string map {& & < < > > ' ' " \"} $x] |
| 647 | 647 | @ } |
| 648 | -@ | |
| 648 | +@ | |
| 649 | 649 | @ proc cols {} { |
| 650 | 650 | @ return [list .lnA .txtA .mkr .lnB .txtB] |
| 651 | 651 | @ } |
| 652 | -@ | |
| 652 | +@ | |
| 653 | 653 | @ proc colType {c} { |
| 654 | 654 | @ regexp {[a-z]+} $c type |
| 655 | 655 | @ return $type |
| 656 | 656 | @ } |
| 657 | -@ | |
| 657 | +@ | |
| 658 | 658 | @ proc getLine {difftxt N iivar} { |
| 659 | 659 | @ upvar $iivar ii |
| 660 | 660 | @ if {$ii>=$N} {return -1} |
| 661 | 661 | @ set x [lindex $difftxt $ii] |
| 662 | 662 | @ incr ii |
| 663 | 663 | @ return $x |
| 664 | 664 | @ } |
| 665 | -@ | |
| 665 | +@ | |
| 666 | 666 | @ proc readDiffs {fossilcmd} { |
| 667 | 667 | @ global difftxt |
| 668 | 668 | @ if {![info exists difftxt]} { |
| 669 | 669 | @ set in [open $fossilcmd r] |
| 670 | 670 | @ fconfigure $in -encoding utf-8 |
| @@ -686,14 +686,14 @@ | ||
| 686 | 686 | @ continue |
| 687 | 687 | @ } |
| 688 | 688 | @ incr nDiffs |
| 689 | 689 | @ set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}] |
| 690 | 690 | @ .wfiles.lb insert end $fn |
| 691 | -@ | |
| 691 | +@ | |
| 692 | 692 | @ foreach c [cols] { |
| 693 | 693 | @ while {[getLine $difftxt $N ii] ne "<pre>"} continue |
| 694 | -@ | |
| 694 | +@ | |
| 695 | 695 | @ if {$nDiffs > 1} { |
| 696 | 696 | @ $c insert end \n - |
| 697 | 697 | @ } |
| 698 | 698 | @ if {[colType $c] eq "txt"} { |
| 699 | 699 | @ $c insert end $fn\n fn |
| @@ -700,21 +700,21 @@ | ||
| 700 | 700 | @ if {$fn2!=""} {set fn $fn2} |
| 701 | 701 | @ } else { |
| 702 | 702 | @ $c insert end \n fn |
| 703 | 703 | @ } |
| 704 | 704 | @ $c insert end \n - |
| 705 | -@ | |
| 705 | +@ | |
| 706 | 706 | @ set type [colType $c] |
| 707 | 707 | @ set str {} |
| 708 | 708 | @ while {[set line [getLine $difftxt $N ii]] ne "</pre>"} { |
| 709 | 709 | @ set len [string length [dehtml $line]] |
| 710 | 710 | @ if {$len > $widths($type)} { |
| 711 | 711 | @ set widths($type) $len |
| 712 | 712 | @ } |
| 713 | 713 | @ append str $line\n |
| 714 | 714 | @ } |
| 715 | -@ | |
| 715 | +@ | |
| 716 | 716 | @ set re {<span class="diff([a-z]+)">([^<]*)</span>} |
| 717 | 717 | @ # Use \r as separator since it can't appear in the diff output (it gets |
| 718 | 718 | @ # converted to a space). |
| 719 | 719 | @ set str [regsub -all $re $str "\r\\1\r\\2\r"] |
| 720 | 720 | @ foreach {pre class mid} [split $str \r] { |
| @@ -724,11 +724,11 @@ | ||
| 724 | 724 | @ $c insert end [dehtml $pre] - |
| 725 | 725 | @ } |
| 726 | 726 | @ } |
| 727 | 727 | @ } |
| 728 | 728 | @ } |
| 729 | -@ | |
| 729 | +@ | |
| 730 | 730 | @ foreach c [cols] { |
| 731 | 731 | @ set type [colType $c] |
| 732 | 732 | @ if {$type ne "txt"} { |
| 733 | 733 | @ $c config -width $widths($type) |
| 734 | 734 | @ } |
| @@ -736,19 +736,19 @@ | ||
| 736 | 736 | @ } |
| 737 | 737 | @ if {$nDiffs <= [.wfiles.lb cget -height]} { |
| 738 | 738 | @ .wfiles.lb config -height $nDiffs |
| 739 | 739 | @ grid remove .wfiles.sb |
| 740 | 740 | @ } |
| 741 | -@ | |
| 741 | +@ | |
| 742 | 742 | @ return $nDiffs |
| 743 | 743 | @ } |
| 744 | -@ | |
| 744 | +@ | |
| 745 | 745 | @ proc viewDiff {idx} { |
| 746 | 746 | @ .txtA yview $idx |
| 747 | 747 | @ .txtA xview moveto 0 |
| 748 | 748 | @ } |
| 749 | -@ | |
| 749 | +@ | |
| 750 | 750 | @ proc cycleDiffs {{reverse 0}} { |
| 751 | 751 | @ if {$reverse} { |
| 752 | 752 | @ set range [.txtA tag prevrange fn @0,0 1.0] |
| 753 | 753 | @ if {$range eq ""} { |
| 754 | 754 | @ viewDiff {fn.last -1c} |
| @@ -762,36 +762,36 @@ | ||
| 762 | 762 | @ } else { |
| 763 | 763 | @ viewDiff [lindex $range 0] |
| 764 | 764 | @ } |
| 765 | 765 | @ } |
| 766 | 766 | @ } |
| 767 | -@ | |
| 767 | +@ | |
| 768 | 768 | @ proc xvis {col} { |
| 769 | 769 | @ set view [$col xview] |
| 770 | 770 | @ return [expr {[lindex $view 1]-[lindex $view 0]}] |
| 771 | 771 | @ } |
| 772 | -@ | |
| 772 | +@ | |
| 773 | 773 | @ proc scroll-x {args} { |
| 774 | 774 | @ set c .txt[expr {[xvis .txtA] < [xvis .txtB] ? "A" : "B"}] |
| 775 | 775 | @ eval $c xview $args |
| 776 | 776 | @ } |
| 777 | -@ | |
| 777 | +@ | |
| 778 | 778 | @ interp alias {} scroll-y {} .txtA yview |
| 779 | -@ | |
| 779 | +@ | |
| 780 | 780 | @ proc noop {args} {} |
| 781 | -@ | |
| 781 | +@ | |
| 782 | 782 | @ proc enableSync {axis} { |
| 783 | 783 | @ update idletasks |
| 784 | 784 | @ interp alias {} sync-$axis {} |
| 785 | 785 | @ rename _sync-$axis sync-$axis |
| 786 | 786 | @ } |
| 787 | -@ | |
| 787 | +@ | |
| 788 | 788 | @ proc disableSync {axis} { |
| 789 | 789 | @ rename sync-$axis _sync-$axis |
| 790 | 790 | @ interp alias {} sync-$axis {} noop |
| 791 | 791 | @ } |
| 792 | -@ | |
| 792 | +@ | |
| 793 | 793 | @ proc sync-x {col first last} { |
| 794 | 794 | @ disableSync x |
| 795 | 795 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 796 | 796 | @ foreach side {A B} { |
| 797 | 797 | @ set sb .sbx$side |
| @@ -803,11 +803,11 @@ | ||
| 803 | 803 | @ grid remove $sb |
| 804 | 804 | @ } |
| 805 | 805 | @ } |
| 806 | 806 | @ enableSync x |
| 807 | 807 | @ } |
| 808 | -@ | |
| 808 | +@ | |
| 809 | 809 | @ proc sync-y {first last} { |
| 810 | 810 | @ disableSync y |
| 811 | 811 | @ foreach c [cols] { |
| 812 | 812 | @ $c yview moveto $first |
| 813 | 813 | @ } |
| @@ -817,11 +817,11 @@ | ||
| 817 | 817 | @ } else { |
| 818 | 818 | @ grid remove .sby |
| 819 | 819 | @ } |
| 820 | 820 | @ enableSync y |
| 821 | 821 | @ } |
| 822 | -@ | |
| 822 | +@ | |
| 823 | 823 | @ wm withdraw . |
| 824 | 824 | @ wm title . $CFG(TITLE) |
| 825 | 825 | @ wm iconname . $CFG(TITLE) |
| 826 | 826 | @ bind . <q> exit |
| 827 | 827 | @ bind . <Destroy> {after 0 exit} |
| @@ -843,11 +843,11 @@ | ||
| 843 | 843 | @ End y {moveto 1} |
| 844 | 844 | @ } { |
| 845 | 845 | @ bind . <$key> "scroll-$axis $args; break" |
| 846 | 846 | @ bind . <Shift-$key> continue |
| 847 | 847 | @ } |
| 848 | -@ | |
| 848 | +@ | |
| 849 | 849 | @ frame .bb |
| 850 | 850 | @ ::ttk::menubutton .bb.files -text "Files" |
| 851 | 851 | @ toplevel .wfiles |
| 852 | 852 | @ wm withdraw .wfiles |
| 853 | 853 | @ update idletasks |
| @@ -878,16 +878,16 @@ | ||
| 878 | 878 | @ } |
| 879 | 879 | @ bind .wfiles.lb <Motion> { |
| 880 | 880 | @ %W selection clear 0 end |
| 881 | 881 | @ %W selection set @%x,%y |
| 882 | 882 | @ } |
| 883 | -@ | |
| 883 | +@ | |
| 884 | 884 | @ foreach {side syncCol} {A .txtB B .txtA} { |
| 885 | 885 | @ set ln .ln$side |
| 886 | 886 | @ text $ln |
| 887 | 887 | @ $ln tag config - -justify right |
| 888 | -@ | |
| 888 | +@ | |
| 889 | 889 | @ set txt .txt$side |
| 890 | 890 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 891 | 891 | @ -xscroll "sync-x $syncCol" |
| 892 | 892 | @ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 |
| 893 | 893 | @ foreach tag {add rm chng} { |
| @@ -896,11 +896,11 @@ | ||
| 896 | 896 | @ } |
| 897 | 897 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 898 | 898 | @ -justify center |
| 899 | 899 | @ } |
| 900 | 900 | @ text .mkr |
| 901 | -@ | |
| 901 | +@ | |
| 902 | 902 | @ foreach c [cols] { |
| 903 | 903 | @ set keyPrefix [string toupper [colType $c]]_COL_ |
| 904 | 904 | @ if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}} |
| 905 | 905 | @ $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \ |
| 906 | 906 | @ -padx $CFG(PADX) -yscroll sync-y |
| @@ -908,22 +908,22 @@ | ||
| 908 | 908 | @ -foreground $CFG(HR_FG) |
| 909 | 909 | @ $c tag config fn -spacing1 $CFG(FN_PAD) -spacing3 $CFG(FN_PAD) |
| 910 | 910 | @ bindtags $c ". $c Text all" |
| 911 | 911 | @ bind $c <1> {focus %W} |
| 912 | 912 | @ } |
| 913 | -@ | |
| 913 | +@ | |
| 914 | 914 | @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical |
| 915 | 915 | @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal |
| 916 | 916 | @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal |
| 917 | 917 | @ frame .spacer |
| 918 | -@ | |
| 918 | +@ | |
| 919 | 919 | @ if {[readDiffs $fossilcmd] == 0} { |
| 920 | 920 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 921 | 921 | @ exit |
| 922 | 922 | @ } |
| 923 | 923 | @ update idletasks |
| 924 | -@ | |
| 924 | +@ | |
| 925 | 925 | @ proc saveDiff {} { |
| 926 | 926 | @ set fn [tk_getSaveFile] |
| 927 | 927 | @ set out [open $fn wb] |
| 928 | 928 | @ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" |
| 929 | 929 | @ puts $out "# to see the graphical diff.\n#" |
| @@ -947,11 +947,11 @@ | ||
| 947 | 947 | @ eval grid [cols] -row 1 -sticky nsew |
| 948 | 948 | @ grid .sby -row 1 -column 5 -sticky ns |
| 949 | 949 | @ grid .sbxA -row 2 -columnspan 2 -sticky ew |
| 950 | 950 | @ grid .spacer -row 2 -column 2 |
| 951 | 951 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 952 | -@ | |
| 952 | +@ | |
| 953 | 953 | @ .spacer config -height [winfo height .sbxA] |
| 954 | 954 | @ wm deiconify . |
| 955 | 955 | @ } |
| 956 | 956 | @ eval $prog |
| 957 | 957 | ; |
| 958 | 958 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -610,11 +610,11 @@ | |
| 610 | /* A Tcl/Tk script used to render diff output. |
| 611 | */ |
| 612 | static const char zDiffScript[] = |
| 613 | @ set prog { |
| 614 | @ package require Tk |
| 615 | @ |
| 616 | @ array set CFG { |
| 617 | @ TITLE {Fossil Diff} |
| 618 | @ LN_COL_BG #dddddd |
| 619 | @ LN_COL_FG #444444 |
| 620 | @ TXT_COL_BG #ffffff |
| @@ -633,38 +633,38 @@ | |
| 633 | @ PADX 5 |
| 634 | @ WIDTH 80 |
| 635 | @ HEIGHT 45 |
| 636 | @ LB_HEIGHT 25 |
| 637 | @ } |
| 638 | @ |
| 639 | @ if {![namespace exists ttk]} { |
| 640 | @ interp alias {} ::ttk::scrollbar {} ::scrollbar |
| 641 | @ interp alias {} ::ttk::menubutton {} ::menubutton |
| 642 | @ } |
| 643 | @ |
| 644 | @ proc dehtml {x} { |
| 645 | @ set x [regsub -all {<[^>]*>} $x {}] |
| 646 | @ return [string map {& & < < > > ' ' " \"} $x] |
| 647 | @ } |
| 648 | @ |
| 649 | @ proc cols {} { |
| 650 | @ return [list .lnA .txtA .mkr .lnB .txtB] |
| 651 | @ } |
| 652 | @ |
| 653 | @ proc colType {c} { |
| 654 | @ regexp {[a-z]+} $c type |
| 655 | @ return $type |
| 656 | @ } |
| 657 | @ |
| 658 | @ proc getLine {difftxt N iivar} { |
| 659 | @ upvar $iivar ii |
| 660 | @ if {$ii>=$N} {return -1} |
| 661 | @ set x [lindex $difftxt $ii] |
| 662 | @ incr ii |
| 663 | @ return $x |
| 664 | @ } |
| 665 | @ |
| 666 | @ proc readDiffs {fossilcmd} { |
| 667 | @ global difftxt |
| 668 | @ if {![info exists difftxt]} { |
| 669 | @ set in [open $fossilcmd r] |
| 670 | @ fconfigure $in -encoding utf-8 |
| @@ -686,14 +686,14 @@ | |
| 686 | @ continue |
| 687 | @ } |
| 688 | @ incr nDiffs |
| 689 | @ set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}] |
| 690 | @ .wfiles.lb insert end $fn |
| 691 | @ |
| 692 | @ foreach c [cols] { |
| 693 | @ while {[getLine $difftxt $N ii] ne "<pre>"} continue |
| 694 | @ |
| 695 | @ if {$nDiffs > 1} { |
| 696 | @ $c insert end \n - |
| 697 | @ } |
| 698 | @ if {[colType $c] eq "txt"} { |
| 699 | @ $c insert end $fn\n fn |
| @@ -700,21 +700,21 @@ | |
| 700 | @ if {$fn2!=""} {set fn $fn2} |
| 701 | @ } else { |
| 702 | @ $c insert end \n fn |
| 703 | @ } |
| 704 | @ $c insert end \n - |
| 705 | @ |
| 706 | @ set type [colType $c] |
| 707 | @ set str {} |
| 708 | @ while {[set line [getLine $difftxt $N ii]] ne "</pre>"} { |
| 709 | @ set len [string length [dehtml $line]] |
| 710 | @ if {$len > $widths($type)} { |
| 711 | @ set widths($type) $len |
| 712 | @ } |
| 713 | @ append str $line\n |
| 714 | @ } |
| 715 | @ |
| 716 | @ set re {<span class="diff([a-z]+)">([^<]*)</span>} |
| 717 | @ # Use \r as separator since it can't appear in the diff output (it gets |
| 718 | @ # converted to a space). |
| 719 | @ set str [regsub -all $re $str "\r\\1\r\\2\r"] |
| 720 | @ foreach {pre class mid} [split $str \r] { |
| @@ -724,11 +724,11 @@ | |
| 724 | @ $c insert end [dehtml $pre] - |
| 725 | @ } |
| 726 | @ } |
| 727 | @ } |
| 728 | @ } |
| 729 | @ |
| 730 | @ foreach c [cols] { |
| 731 | @ set type [colType $c] |
| 732 | @ if {$type ne "txt"} { |
| 733 | @ $c config -width $widths($type) |
| 734 | @ } |
| @@ -736,19 +736,19 @@ | |
| 736 | @ } |
| 737 | @ if {$nDiffs <= [.wfiles.lb cget -height]} { |
| 738 | @ .wfiles.lb config -height $nDiffs |
| 739 | @ grid remove .wfiles.sb |
| 740 | @ } |
| 741 | @ |
| 742 | @ return $nDiffs |
| 743 | @ } |
| 744 | @ |
| 745 | @ proc viewDiff {idx} { |
| 746 | @ .txtA yview $idx |
| 747 | @ .txtA xview moveto 0 |
| 748 | @ } |
| 749 | @ |
| 750 | @ proc cycleDiffs {{reverse 0}} { |
| 751 | @ if {$reverse} { |
| 752 | @ set range [.txtA tag prevrange fn @0,0 1.0] |
| 753 | @ if {$range eq ""} { |
| 754 | @ viewDiff {fn.last -1c} |
| @@ -762,36 +762,36 @@ | |
| 762 | @ } else { |
| 763 | @ viewDiff [lindex $range 0] |
| 764 | @ } |
| 765 | @ } |
| 766 | @ } |
| 767 | @ |
| 768 | @ proc xvis {col} { |
| 769 | @ set view [$col xview] |
| 770 | @ return [expr {[lindex $view 1]-[lindex $view 0]}] |
| 771 | @ } |
| 772 | @ |
| 773 | @ proc scroll-x {args} { |
| 774 | @ set c .txt[expr {[xvis .txtA] < [xvis .txtB] ? "A" : "B"}] |
| 775 | @ eval $c xview $args |
| 776 | @ } |
| 777 | @ |
| 778 | @ interp alias {} scroll-y {} .txtA yview |
| 779 | @ |
| 780 | @ proc noop {args} {} |
| 781 | @ |
| 782 | @ proc enableSync {axis} { |
| 783 | @ update idletasks |
| 784 | @ interp alias {} sync-$axis {} |
| 785 | @ rename _sync-$axis sync-$axis |
| 786 | @ } |
| 787 | @ |
| 788 | @ proc disableSync {axis} { |
| 789 | @ rename sync-$axis _sync-$axis |
| 790 | @ interp alias {} sync-$axis {} noop |
| 791 | @ } |
| 792 | @ |
| 793 | @ proc sync-x {col first last} { |
| 794 | @ disableSync x |
| 795 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 796 | @ foreach side {A B} { |
| 797 | @ set sb .sbx$side |
| @@ -803,11 +803,11 @@ | |
| 803 | @ grid remove $sb |
| 804 | @ } |
| 805 | @ } |
| 806 | @ enableSync x |
| 807 | @ } |
| 808 | @ |
| 809 | @ proc sync-y {first last} { |
| 810 | @ disableSync y |
| 811 | @ foreach c [cols] { |
| 812 | @ $c yview moveto $first |
| 813 | @ } |
| @@ -817,11 +817,11 @@ | |
| 817 | @ } else { |
| 818 | @ grid remove .sby |
| 819 | @ } |
| 820 | @ enableSync y |
| 821 | @ } |
| 822 | @ |
| 823 | @ wm withdraw . |
| 824 | @ wm title . $CFG(TITLE) |
| 825 | @ wm iconname . $CFG(TITLE) |
| 826 | @ bind . <q> exit |
| 827 | @ bind . <Destroy> {after 0 exit} |
| @@ -843,11 +843,11 @@ | |
| 843 | @ End y {moveto 1} |
| 844 | @ } { |
| 845 | @ bind . <$key> "scroll-$axis $args; break" |
| 846 | @ bind . <Shift-$key> continue |
| 847 | @ } |
| 848 | @ |
| 849 | @ frame .bb |
| 850 | @ ::ttk::menubutton .bb.files -text "Files" |
| 851 | @ toplevel .wfiles |
| 852 | @ wm withdraw .wfiles |
| 853 | @ update idletasks |
| @@ -878,16 +878,16 @@ | |
| 878 | @ } |
| 879 | @ bind .wfiles.lb <Motion> { |
| 880 | @ %W selection clear 0 end |
| 881 | @ %W selection set @%x,%y |
| 882 | @ } |
| 883 | @ |
| 884 | @ foreach {side syncCol} {A .txtB B .txtA} { |
| 885 | @ set ln .ln$side |
| 886 | @ text $ln |
| 887 | @ $ln tag config - -justify right |
| 888 | @ |
| 889 | @ set txt .txt$side |
| 890 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 891 | @ -xscroll "sync-x $syncCol" |
| 892 | @ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 |
| 893 | @ foreach tag {add rm chng} { |
| @@ -896,11 +896,11 @@ | |
| 896 | @ } |
| 897 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 898 | @ -justify center |
| 899 | @ } |
| 900 | @ text .mkr |
| 901 | @ |
| 902 | @ foreach c [cols] { |
| 903 | @ set keyPrefix [string toupper [colType $c]]_COL_ |
| 904 | @ if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}} |
| 905 | @ $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \ |
| 906 | @ -padx $CFG(PADX) -yscroll sync-y |
| @@ -908,22 +908,22 @@ | |
| 908 | @ -foreground $CFG(HR_FG) |
| 909 | @ $c tag config fn -spacing1 $CFG(FN_PAD) -spacing3 $CFG(FN_PAD) |
| 910 | @ bindtags $c ". $c Text all" |
| 911 | @ bind $c <1> {focus %W} |
| 912 | @ } |
| 913 | @ |
| 914 | @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical |
| 915 | @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal |
| 916 | @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal |
| 917 | @ frame .spacer |
| 918 | @ |
| 919 | @ if {[readDiffs $fossilcmd] == 0} { |
| 920 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 921 | @ exit |
| 922 | @ } |
| 923 | @ update idletasks |
| 924 | @ |
| 925 | @ proc saveDiff {} { |
| 926 | @ set fn [tk_getSaveFile] |
| 927 | @ set out [open $fn wb] |
| 928 | @ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" |
| 929 | @ puts $out "# to see the graphical diff.\n#" |
| @@ -947,11 +947,11 @@ | |
| 947 | @ eval grid [cols] -row 1 -sticky nsew |
| 948 | @ grid .sby -row 1 -column 5 -sticky ns |
| 949 | @ grid .sbxA -row 2 -columnspan 2 -sticky ew |
| 950 | @ grid .spacer -row 2 -column 2 |
| 951 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 952 | @ |
| 953 | @ .spacer config -height [winfo height .sbxA] |
| 954 | @ wm deiconify . |
| 955 | @ } |
| 956 | @ eval $prog |
| 957 | ; |
| 958 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -610,11 +610,11 @@ | |
| 610 | /* A Tcl/Tk script used to render diff output. |
| 611 | */ |
| 612 | static const char zDiffScript[] = |
| 613 | @ set prog { |
| 614 | @ package require Tk |
| 615 | @ |
| 616 | @ array set CFG { |
| 617 | @ TITLE {Fossil Diff} |
| 618 | @ LN_COL_BG #dddddd |
| 619 | @ LN_COL_FG #444444 |
| 620 | @ TXT_COL_BG #ffffff |
| @@ -633,38 +633,38 @@ | |
| 633 | @ PADX 5 |
| 634 | @ WIDTH 80 |
| 635 | @ HEIGHT 45 |
| 636 | @ LB_HEIGHT 25 |
| 637 | @ } |
| 638 | @ |
| 639 | @ if {![namespace exists ttk]} { |
| 640 | @ interp alias {} ::ttk::scrollbar {} ::scrollbar |
| 641 | @ interp alias {} ::ttk::menubutton {} ::menubutton |
| 642 | @ } |
| 643 | @ |
| 644 | @ proc dehtml {x} { |
| 645 | @ set x [regsub -all {<[^>]*>} $x {}] |
| 646 | @ return [string map {& & < < > > ' ' " \"} $x] |
| 647 | @ } |
| 648 | @ |
| 649 | @ proc cols {} { |
| 650 | @ return [list .lnA .txtA .mkr .lnB .txtB] |
| 651 | @ } |
| 652 | @ |
| 653 | @ proc colType {c} { |
| 654 | @ regexp {[a-z]+} $c type |
| 655 | @ return $type |
| 656 | @ } |
| 657 | @ |
| 658 | @ proc getLine {difftxt N iivar} { |
| 659 | @ upvar $iivar ii |
| 660 | @ if {$ii>=$N} {return -1} |
| 661 | @ set x [lindex $difftxt $ii] |
| 662 | @ incr ii |
| 663 | @ return $x |
| 664 | @ } |
| 665 | @ |
| 666 | @ proc readDiffs {fossilcmd} { |
| 667 | @ global difftxt |
| 668 | @ if {![info exists difftxt]} { |
| 669 | @ set in [open $fossilcmd r] |
| 670 | @ fconfigure $in -encoding utf-8 |
| @@ -686,14 +686,14 @@ | |
| 686 | @ continue |
| 687 | @ } |
| 688 | @ incr nDiffs |
| 689 | @ set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}] |
| 690 | @ .wfiles.lb insert end $fn |
| 691 | @ |
| 692 | @ foreach c [cols] { |
| 693 | @ while {[getLine $difftxt $N ii] ne "<pre>"} continue |
| 694 | @ |
| 695 | @ if {$nDiffs > 1} { |
| 696 | @ $c insert end \n - |
| 697 | @ } |
| 698 | @ if {[colType $c] eq "txt"} { |
| 699 | @ $c insert end $fn\n fn |
| @@ -700,21 +700,21 @@ | |
| 700 | @ if {$fn2!=""} {set fn $fn2} |
| 701 | @ } else { |
| 702 | @ $c insert end \n fn |
| 703 | @ } |
| 704 | @ $c insert end \n - |
| 705 | @ |
| 706 | @ set type [colType $c] |
| 707 | @ set str {} |
| 708 | @ while {[set line [getLine $difftxt $N ii]] ne "</pre>"} { |
| 709 | @ set len [string length [dehtml $line]] |
| 710 | @ if {$len > $widths($type)} { |
| 711 | @ set widths($type) $len |
| 712 | @ } |
| 713 | @ append str $line\n |
| 714 | @ } |
| 715 | @ |
| 716 | @ set re {<span class="diff([a-z]+)">([^<]*)</span>} |
| 717 | @ # Use \r as separator since it can't appear in the diff output (it gets |
| 718 | @ # converted to a space). |
| 719 | @ set str [regsub -all $re $str "\r\\1\r\\2\r"] |
| 720 | @ foreach {pre class mid} [split $str \r] { |
| @@ -724,11 +724,11 @@ | |
| 724 | @ $c insert end [dehtml $pre] - |
| 725 | @ } |
| 726 | @ } |
| 727 | @ } |
| 728 | @ } |
| 729 | @ |
| 730 | @ foreach c [cols] { |
| 731 | @ set type [colType $c] |
| 732 | @ if {$type ne "txt"} { |
| 733 | @ $c config -width $widths($type) |
| 734 | @ } |
| @@ -736,19 +736,19 @@ | |
| 736 | @ } |
| 737 | @ if {$nDiffs <= [.wfiles.lb cget -height]} { |
| 738 | @ .wfiles.lb config -height $nDiffs |
| 739 | @ grid remove .wfiles.sb |
| 740 | @ } |
| 741 | @ |
| 742 | @ return $nDiffs |
| 743 | @ } |
| 744 | @ |
| 745 | @ proc viewDiff {idx} { |
| 746 | @ .txtA yview $idx |
| 747 | @ .txtA xview moveto 0 |
| 748 | @ } |
| 749 | @ |
| 750 | @ proc cycleDiffs {{reverse 0}} { |
| 751 | @ if {$reverse} { |
| 752 | @ set range [.txtA tag prevrange fn @0,0 1.0] |
| 753 | @ if {$range eq ""} { |
| 754 | @ viewDiff {fn.last -1c} |
| @@ -762,36 +762,36 @@ | |
| 762 | @ } else { |
| 763 | @ viewDiff [lindex $range 0] |
| 764 | @ } |
| 765 | @ } |
| 766 | @ } |
| 767 | @ |
| 768 | @ proc xvis {col} { |
| 769 | @ set view [$col xview] |
| 770 | @ return [expr {[lindex $view 1]-[lindex $view 0]}] |
| 771 | @ } |
| 772 | @ |
| 773 | @ proc scroll-x {args} { |
| 774 | @ set c .txt[expr {[xvis .txtA] < [xvis .txtB] ? "A" : "B"}] |
| 775 | @ eval $c xview $args |
| 776 | @ } |
| 777 | @ |
| 778 | @ interp alias {} scroll-y {} .txtA yview |
| 779 | @ |
| 780 | @ proc noop {args} {} |
| 781 | @ |
| 782 | @ proc enableSync {axis} { |
| 783 | @ update idletasks |
| 784 | @ interp alias {} sync-$axis {} |
| 785 | @ rename _sync-$axis sync-$axis |
| 786 | @ } |
| 787 | @ |
| 788 | @ proc disableSync {axis} { |
| 789 | @ rename sync-$axis _sync-$axis |
| 790 | @ interp alias {} sync-$axis {} noop |
| 791 | @ } |
| 792 | @ |
| 793 | @ proc sync-x {col first last} { |
| 794 | @ disableSync x |
| 795 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 796 | @ foreach side {A B} { |
| 797 | @ set sb .sbx$side |
| @@ -803,11 +803,11 @@ | |
| 803 | @ grid remove $sb |
| 804 | @ } |
| 805 | @ } |
| 806 | @ enableSync x |
| 807 | @ } |
| 808 | @ |
| 809 | @ proc sync-y {first last} { |
| 810 | @ disableSync y |
| 811 | @ foreach c [cols] { |
| 812 | @ $c yview moveto $first |
| 813 | @ } |
| @@ -817,11 +817,11 @@ | |
| 817 | @ } else { |
| 818 | @ grid remove .sby |
| 819 | @ } |
| 820 | @ enableSync y |
| 821 | @ } |
| 822 | @ |
| 823 | @ wm withdraw . |
| 824 | @ wm title . $CFG(TITLE) |
| 825 | @ wm iconname . $CFG(TITLE) |
| 826 | @ bind . <q> exit |
| 827 | @ bind . <Destroy> {after 0 exit} |
| @@ -843,11 +843,11 @@ | |
| 843 | @ End y {moveto 1} |
| 844 | @ } { |
| 845 | @ bind . <$key> "scroll-$axis $args; break" |
| 846 | @ bind . <Shift-$key> continue |
| 847 | @ } |
| 848 | @ |
| 849 | @ frame .bb |
| 850 | @ ::ttk::menubutton .bb.files -text "Files" |
| 851 | @ toplevel .wfiles |
| 852 | @ wm withdraw .wfiles |
| 853 | @ update idletasks |
| @@ -878,16 +878,16 @@ | |
| 878 | @ } |
| 879 | @ bind .wfiles.lb <Motion> { |
| 880 | @ %W selection clear 0 end |
| 881 | @ %W selection set @%x,%y |
| 882 | @ } |
| 883 | @ |
| 884 | @ foreach {side syncCol} {A .txtB B .txtA} { |
| 885 | @ set ln .ln$side |
| 886 | @ text $ln |
| 887 | @ $ln tag config - -justify right |
| 888 | @ |
| 889 | @ set txt .txt$side |
| 890 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 891 | @ -xscroll "sync-x $syncCol" |
| 892 | @ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 |
| 893 | @ foreach tag {add rm chng} { |
| @@ -896,11 +896,11 @@ | |
| 896 | @ } |
| 897 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 898 | @ -justify center |
| 899 | @ } |
| 900 | @ text .mkr |
| 901 | @ |
| 902 | @ foreach c [cols] { |
| 903 | @ set keyPrefix [string toupper [colType $c]]_COL_ |
| 904 | @ if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}} |
| 905 | @ $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \ |
| 906 | @ -padx $CFG(PADX) -yscroll sync-y |
| @@ -908,22 +908,22 @@ | |
| 908 | @ -foreground $CFG(HR_FG) |
| 909 | @ $c tag config fn -spacing1 $CFG(FN_PAD) -spacing3 $CFG(FN_PAD) |
| 910 | @ bindtags $c ". $c Text all" |
| 911 | @ bind $c <1> {focus %W} |
| 912 | @ } |
| 913 | @ |
| 914 | @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical |
| 915 | @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal |
| 916 | @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal |
| 917 | @ frame .spacer |
| 918 | @ |
| 919 | @ if {[readDiffs $fossilcmd] == 0} { |
| 920 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 921 | @ exit |
| 922 | @ } |
| 923 | @ update idletasks |
| 924 | @ |
| 925 | @ proc saveDiff {} { |
| 926 | @ set fn [tk_getSaveFile] |
| 927 | @ set out [open $fn wb] |
| 928 | @ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" |
| 929 | @ puts $out "# to see the graphical diff.\n#" |
| @@ -947,11 +947,11 @@ | |
| 947 | @ eval grid [cols] -row 1 -sticky nsew |
| 948 | @ grid .sby -row 1 -column 5 -sticky ns |
| 949 | @ grid .sbxA -row 2 -columnspan 2 -sticky ew |
| 950 | @ grid .spacer -row 2 -column 2 |
| 951 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 952 | @ |
| 953 | @ .spacer config -height [winfo height .sbxA] |
| 954 | @ wm deiconify . |
| 955 | @ } |
| 956 | @ eval $prog |
| 957 | ; |
| 958 |
+8
-8
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -185,11 +185,11 @@ | ||
| 185 | 185 | blob_init(&comment, pEvent->zComment, -1); |
| 186 | 186 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 187 | 187 | blob_reset(&comment); |
| 188 | 188 | @ </div> |
| 189 | 189 | @ </blockquote><hr /> |
| 190 | - } | |
| 190 | + } | |
| 191 | 191 | |
| 192 | 192 | wiki_convert(&tail, 0, 0); |
| 193 | 193 | style_footer(); |
| 194 | 194 | manifest_destroy(pEvent); |
| 195 | 195 | } |
| @@ -227,11 +227,11 @@ | ||
| 227 | 227 | fossil_redirect_home(); |
| 228 | 228 | return; |
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | zTag = mprintf("event-%s", zEventId); |
| 232 | - rid = db_int(0, | |
| 232 | + rid = db_int(0, | |
| 233 | 233 | "SELECT rid FROM tagxref" |
| 234 | 234 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)" |
| 235 | 235 | " ORDER BY mtime DESC", zTag |
| 236 | 236 | ); |
| 237 | 237 | free(zTag); |
| @@ -312,11 +312,11 @@ | ||
| 312 | 312 | Stmt q; |
| 313 | 313 | char *zBlob; |
| 314 | 314 | |
| 315 | 315 | /* Load the tags string into a blob */ |
| 316 | 316 | blob_zero(&tags); |
| 317 | - blob_append(&tags, zTags, -1); | |
| 317 | + blob_append(&tags, zTags, -1); | |
| 318 | 318 | |
| 319 | 319 | /* Collapse all sequences of whitespace and "," characters into |
| 320 | 320 | ** a single space character */ |
| 321 | 321 | zBlob = blob_str(&tags); |
| 322 | 322 | for(i=j=0; zBlob[i]; i++, j++){ |
| @@ -341,11 +341,11 @@ | ||
| 341 | 341 | db_prepare(&q, "SELECT x FROM newtags ORDER BY x"); |
| 342 | 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | 344 | } |
| 345 | 345 | db_finalize(&q); |
| 346 | - } | |
| 346 | + } | |
| 347 | 347 | if( g.zLogin ){ |
| 348 | 348 | blob_appendf(&event, "U %F\n", g.zLogin); |
| 349 | 349 | } |
| 350 | 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | 351 | md5sum_blob(&event, &cksum); |
| @@ -411,27 +411,27 @@ | ||
| 411 | 411 | @ <input type="text" name="t" size="25" value="%h(zETime)" /> |
| 412 | 412 | @ </td></tr> |
| 413 | 413 | |
| 414 | 414 | @ <tr><th align="right" valign="top">Timeline Comment:</th> |
| 415 | 415 | @ <td valign="top"> |
| 416 | - @ <textarea name="c" class="eventedit" cols="80" | |
| 416 | + @ <textarea name="c" class="eventedit" cols="80" | |
| 417 | 417 | @ rows="3" wrap="virtual">%h(zComment)</textarea> |
| 418 | 418 | @ </td></tr> |
| 419 | 419 | |
| 420 | 420 | @ <tr><th align="right" valign="top">Background Color:</th> |
| 421 | 421 | @ <td valign="top"> |
| 422 | 422 | render_color_chooser(0, zClr, 0, "clr", "cclr"); |
| 423 | 423 | @ </td></tr> |
| 424 | - | |
| 424 | + | |
| 425 | 425 | @ <tr><th align="right" valign="top">Tags:</th> |
| 426 | 426 | @ <td valign="top"> |
| 427 | 427 | @ <input type="text" name="g" size="40" value="%h(zTags)" /> |
| 428 | 428 | @ </td></tr> |
| 429 | - | |
| 429 | + | |
| 430 | 430 | @ <tr><th align="right" valign="top">Page Content:</th> |
| 431 | 431 | @ <td valign="top"> |
| 432 | - @ <textarea name="w" class="eventedit" cols="80" | |
| 432 | + @ <textarea name="w" class="eventedit" cols="80" | |
| 433 | 433 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 434 | 434 | @ </td></tr> |
| 435 | 435 | |
| 436 | 436 | @ <tr><td colspan="2"> |
| 437 | 437 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 438 | 438 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -185,11 +185,11 @@ | |
| 185 | blob_init(&comment, pEvent->zComment, -1); |
| 186 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 187 | blob_reset(&comment); |
| 188 | @ </div> |
| 189 | @ </blockquote><hr /> |
| 190 | } |
| 191 | |
| 192 | wiki_convert(&tail, 0, 0); |
| 193 | style_footer(); |
| 194 | manifest_destroy(pEvent); |
| 195 | } |
| @@ -227,11 +227,11 @@ | |
| 227 | fossil_redirect_home(); |
| 228 | return; |
| 229 | } |
| 230 | } |
| 231 | zTag = mprintf("event-%s", zEventId); |
| 232 | rid = db_int(0, |
| 233 | "SELECT rid FROM tagxref" |
| 234 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)" |
| 235 | " ORDER BY mtime DESC", zTag |
| 236 | ); |
| 237 | free(zTag); |
| @@ -312,11 +312,11 @@ | |
| 312 | Stmt q; |
| 313 | char *zBlob; |
| 314 | |
| 315 | /* Load the tags string into a blob */ |
| 316 | blob_zero(&tags); |
| 317 | blob_append(&tags, zTags, -1); |
| 318 | |
| 319 | /* Collapse all sequences of whitespace and "," characters into |
| 320 | ** a single space character */ |
| 321 | zBlob = blob_str(&tags); |
| 322 | for(i=j=0; zBlob[i]; i++, j++){ |
| @@ -341,11 +341,11 @@ | |
| 341 | db_prepare(&q, "SELECT x FROM newtags ORDER BY x"); |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( g.zLogin ){ |
| 348 | blob_appendf(&event, "U %F\n", g.zLogin); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| @@ -411,27 +411,27 @@ | |
| 411 | @ <input type="text" name="t" size="25" value="%h(zETime)" /> |
| 412 | @ </td></tr> |
| 413 | |
| 414 | @ <tr><th align="right" valign="top">Timeline Comment:</th> |
| 415 | @ <td valign="top"> |
| 416 | @ <textarea name="c" class="eventedit" cols="80" |
| 417 | @ rows="3" wrap="virtual">%h(zComment)</textarea> |
| 418 | @ </td></tr> |
| 419 | |
| 420 | @ <tr><th align="right" valign="top">Background Color:</th> |
| 421 | @ <td valign="top"> |
| 422 | render_color_chooser(0, zClr, 0, "clr", "cclr"); |
| 423 | @ </td></tr> |
| 424 | |
| 425 | @ <tr><th align="right" valign="top">Tags:</th> |
| 426 | @ <td valign="top"> |
| 427 | @ <input type="text" name="g" size="40" value="%h(zTags)" /> |
| 428 | @ </td></tr> |
| 429 | |
| 430 | @ <tr><th align="right" valign="top">Page Content:</th> |
| 431 | @ <td valign="top"> |
| 432 | @ <textarea name="w" class="eventedit" cols="80" |
| 433 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 434 | @ </td></tr> |
| 435 | |
| 436 | @ <tr><td colspan="2"> |
| 437 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 438 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -185,11 +185,11 @@ | |
| 185 | blob_init(&comment, pEvent->zComment, -1); |
| 186 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 187 | blob_reset(&comment); |
| 188 | @ </div> |
| 189 | @ </blockquote><hr /> |
| 190 | } |
| 191 | |
| 192 | wiki_convert(&tail, 0, 0); |
| 193 | style_footer(); |
| 194 | manifest_destroy(pEvent); |
| 195 | } |
| @@ -227,11 +227,11 @@ | |
| 227 | fossil_redirect_home(); |
| 228 | return; |
| 229 | } |
| 230 | } |
| 231 | zTag = mprintf("event-%s", zEventId); |
| 232 | rid = db_int(0, |
| 233 | "SELECT rid FROM tagxref" |
| 234 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)" |
| 235 | " ORDER BY mtime DESC", zTag |
| 236 | ); |
| 237 | free(zTag); |
| @@ -312,11 +312,11 @@ | |
| 312 | Stmt q; |
| 313 | char *zBlob; |
| 314 | |
| 315 | /* Load the tags string into a blob */ |
| 316 | blob_zero(&tags); |
| 317 | blob_append(&tags, zTags, -1); |
| 318 | |
| 319 | /* Collapse all sequences of whitespace and "," characters into |
| 320 | ** a single space character */ |
| 321 | zBlob = blob_str(&tags); |
| 322 | for(i=j=0; zBlob[i]; i++, j++){ |
| @@ -341,11 +341,11 @@ | |
| 341 | db_prepare(&q, "SELECT x FROM newtags ORDER BY x"); |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( g.zLogin ){ |
| 348 | blob_appendf(&event, "U %F\n", g.zLogin); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| @@ -411,27 +411,27 @@ | |
| 411 | @ <input type="text" name="t" size="25" value="%h(zETime)" /> |
| 412 | @ </td></tr> |
| 413 | |
| 414 | @ <tr><th align="right" valign="top">Timeline Comment:</th> |
| 415 | @ <td valign="top"> |
| 416 | @ <textarea name="c" class="eventedit" cols="80" |
| 417 | @ rows="3" wrap="virtual">%h(zComment)</textarea> |
| 418 | @ </td></tr> |
| 419 | |
| 420 | @ <tr><th align="right" valign="top">Background Color:</th> |
| 421 | @ <td valign="top"> |
| 422 | render_color_chooser(0, zClr, 0, "clr", "cclr"); |
| 423 | @ </td></tr> |
| 424 | |
| 425 | @ <tr><th align="right" valign="top">Tags:</th> |
| 426 | @ <td valign="top"> |
| 427 | @ <input type="text" name="g" size="40" value="%h(zTags)" /> |
| 428 | @ </td></tr> |
| 429 | |
| 430 | @ <tr><th align="right" valign="top">Page Content:</th> |
| 431 | @ <td valign="top"> |
| 432 | @ <textarea name="w" class="eventedit" cols="80" |
| 433 | @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> |
| 434 | @ </td></tr> |
| 435 | |
| 436 | @ <tr><td colspan="2"> |
| 437 | @ <input type="submit" name="preview" value="Preview Your Changes" /> |
| 438 |
+3
-3
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -66,11 +66,11 @@ | ||
| 66 | 66 | /* |
| 67 | 67 | ** Create a temporary table suitable for storing timeline data. |
| 68 | 68 | */ |
| 69 | 69 | static void json_timeline_temp_table(void){ |
| 70 | 70 | /* Field order MUST match that from json_timeline_query()!!! */ |
| 71 | - static const char zSql[] = | |
| 71 | + static const char zSql[] = | |
| 72 | 72 | @ CREATE TEMP TABLE IF NOT EXISTS json_timeline( |
| 73 | 73 | @ sortId INTEGER PRIMARY KEY, |
| 74 | 74 | @ rid INTEGER, |
| 75 | 75 | @ uuid TEXT, |
| 76 | 76 | @ mtime INTEGER, |
| @@ -109,11 +109,11 @@ | ||
| 109 | 109 | @ (SELECT group_concat(substr(tagname,5), ',') FROM tag, tagxref |
| 110 | 110 | @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid |
| 111 | 111 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) as tags, |
| 112 | 112 | @ tagid as tagId, |
| 113 | 113 | @ brief as brief |
| 114 | - @ FROM event JOIN blob | |
| 114 | + @ FROM event JOIN blob | |
| 115 | 115 | @ WHERE blob.rid=event.objid |
| 116 | 116 | ; |
| 117 | 117 | return zBaseSql; |
| 118 | 118 | } |
| 119 | 119 | |
| @@ -316,11 +316,11 @@ | ||
| 316 | 316 | */ |
| 317 | 317 | cson_value * json_get_changed_files(int rid, int flags){ |
| 318 | 318 | cson_value * rowsV = NULL; |
| 319 | 319 | cson_array * rows = NULL; |
| 320 | 320 | Stmt q = empty_Stmt; |
| 321 | - db_prepare(&q, | |
| 321 | + db_prepare(&q, | |
| 322 | 322 | "SELECT (pid==0) AS isnew," |
| 323 | 323 | " (fid==0) AS isdel," |
| 324 | 324 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 325 | 325 | " blob.uuid as uuid," |
| 326 | 326 | " (SELECT uuid FROM blob WHERE rid=pid) as parent," |
| 327 | 327 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | /* |
| 67 | ** Create a temporary table suitable for storing timeline data. |
| 68 | */ |
| 69 | static void json_timeline_temp_table(void){ |
| 70 | /* Field order MUST match that from json_timeline_query()!!! */ |
| 71 | static const char zSql[] = |
| 72 | @ CREATE TEMP TABLE IF NOT EXISTS json_timeline( |
| 73 | @ sortId INTEGER PRIMARY KEY, |
| 74 | @ rid INTEGER, |
| 75 | @ uuid TEXT, |
| 76 | @ mtime INTEGER, |
| @@ -109,11 +109,11 @@ | |
| 109 | @ (SELECT group_concat(substr(tagname,5), ',') FROM tag, tagxref |
| 110 | @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid |
| 111 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) as tags, |
| 112 | @ tagid as tagId, |
| 113 | @ brief as brief |
| 114 | @ FROM event JOIN blob |
| 115 | @ WHERE blob.rid=event.objid |
| 116 | ; |
| 117 | return zBaseSql; |
| 118 | } |
| 119 | |
| @@ -316,11 +316,11 @@ | |
| 316 | */ |
| 317 | cson_value * json_get_changed_files(int rid, int flags){ |
| 318 | cson_value * rowsV = NULL; |
| 319 | cson_array * rows = NULL; |
| 320 | Stmt q = empty_Stmt; |
| 321 | db_prepare(&q, |
| 322 | "SELECT (pid==0) AS isnew," |
| 323 | " (fid==0) AS isdel," |
| 324 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 325 | " blob.uuid as uuid," |
| 326 | " (SELECT uuid FROM blob WHERE rid=pid) as parent," |
| 327 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | /* |
| 67 | ** Create a temporary table suitable for storing timeline data. |
| 68 | */ |
| 69 | static void json_timeline_temp_table(void){ |
| 70 | /* Field order MUST match that from json_timeline_query()!!! */ |
| 71 | static const char zSql[] = |
| 72 | @ CREATE TEMP TABLE IF NOT EXISTS json_timeline( |
| 73 | @ sortId INTEGER PRIMARY KEY, |
| 74 | @ rid INTEGER, |
| 75 | @ uuid TEXT, |
| 76 | @ mtime INTEGER, |
| @@ -109,11 +109,11 @@ | |
| 109 | @ (SELECT group_concat(substr(tagname,5), ',') FROM tag, tagxref |
| 110 | @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid |
| 111 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) as tags, |
| 112 | @ tagid as tagId, |
| 113 | @ brief as brief |
| 114 | @ FROM event JOIN blob |
| 115 | @ WHERE blob.rid=event.objid |
| 116 | ; |
| 117 | return zBaseSql; |
| 118 | } |
| 119 | |
| @@ -316,11 +316,11 @@ | |
| 316 | */ |
| 317 | cson_value * json_get_changed_files(int rid, int flags){ |
| 318 | cson_value * rowsV = NULL; |
| 319 | cson_array * rows = NULL; |
| 320 | Stmt q = empty_Stmt; |
| 321 | db_prepare(&q, |
| 322 | "SELECT (pid==0) AS isnew," |
| 323 | " (fid==0) AS isdel," |
| 324 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 325 | " blob.uuid as uuid," |
| 326 | " (SELECT uuid FROM blob WHERE rid=pid) as parent," |
| 327 |
+9
-9
| --- src/schema.c | ||
| +++ src/schema.c | ||
| @@ -21,11 +21,11 @@ | ||
| 21 | 21 | #include "schema.h" |
| 22 | 22 | |
| 23 | 23 | /* |
| 24 | 24 | ** The database schema for the ~/.fossil configuration database. |
| 25 | 25 | */ |
| 26 | -const char zConfigSchema[] = | |
| 26 | +const char zConfigSchema[] = | |
| 27 | 27 | @ -- This file contains the schema for the database that is kept in the |
| 28 | 28 | @ -- ~/.fossil file and that stores information about the users setup. |
| 29 | 29 | @ -- |
| 30 | 30 | @ CREATE TABLE global_config( |
| 31 | 31 | @ name TEXT PRIMARY KEY, |
| @@ -50,19 +50,19 @@ | ||
| 50 | 50 | |
| 51 | 51 | #endif /* INTERFACE */ |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | /* |
| 55 | -** The schema for a repository database. | |
| 55 | +** The schema for a repository database. | |
| 56 | 56 | ** |
| 57 | 57 | ** Schema1[] contains parts of the schema that are fixed and unchanging |
| 58 | 58 | ** across versions. Schema2[] contains parts of the schema that can |
| 59 | 59 | ** change from one version to the next. The information in Schema2[] |
| 60 | 60 | ** is reconstructed from the information in Schema1[] by the "rebuild" |
| 61 | 61 | ** operation. |
| 62 | 62 | */ |
| 63 | -const char zRepositorySchema1[] = | |
| 63 | +const char zRepositorySchema1[] = | |
| 64 | 64 | @ -- The BLOB and DELTA tables contain all records held in the repository. |
| 65 | 65 | @ -- |
| 66 | 66 | @ -- The BLOB.CONTENT column is always compressed using zlib. This |
| 67 | 67 | @ -- column might hold the full text of the record or it might hold |
| 68 | 68 | @ -- a delta that is able to reconstruct the record from some other |
| @@ -69,11 +69,11 @@ | ||
| 69 | 69 | @ -- record. If BLOB.CONTENT holds a delta, then a DELTA table entry |
| 70 | 70 | @ -- will exist for the record and that entry will point to another |
| 71 | 71 | @ -- entry that holds the source of the delta. Deltas can be chained. |
| 72 | 72 | @ -- |
| 73 | 73 | @ -- The blob and delta tables collectively hold the "global state" of |
| 74 | -@ -- a Fossil repository. | |
| 74 | +@ -- a Fossil repository. | |
| 75 | 75 | @ -- |
| 76 | 76 | @ CREATE TABLE blob( |
| 77 | 77 | @ rid INTEGER PRIMARY KEY, -- Record ID |
| 78 | 78 | @ rcvid INTEGER, -- Origin of this record |
| 79 | 79 | @ size INTEGER, -- Size of content. -1 for a phantom. |
| @@ -89,11 +89,11 @@ | ||
| 89 | 89 | @ |
| 90 | 90 | @ ------------------------------------------------------------------------- |
| 91 | 91 | @ -- The BLOB and DELTA tables above hold the "global state" of a Fossil |
| 92 | 92 | @ -- project; the stuff that is normally exchanged during "sync". The |
| 93 | 93 | @ -- "local state" of a repository is contained in the remaining tables of |
| 94 | -@ -- the zRepositorySchema1 string. | |
| 94 | +@ -- the zRepositorySchema1 string. | |
| 95 | 95 | @ ------------------------------------------------------------------------- |
| 96 | 96 | @ |
| 97 | 97 | @ -- Whenever new blobs are received into the repository, an entry |
| 98 | 98 | @ -- in this table records the source of the blob. |
| 99 | 99 | @ -- |
| @@ -172,11 +172,11 @@ | ||
| 172 | 172 | @ ); |
| 173 | 173 | @ |
| 174 | 174 | @ -- Some ticket content (such as the originators email address or contact |
| 175 | 175 | @ -- information) needs to be obscured to protect privacy. This is achieved |
| 176 | 176 | @ -- by storing an SHA1 hash of the content. For display, the hash is |
| 177 | -@ -- mapped back into the original text using this table. | |
| 177 | +@ -- mapped back into the original text using this table. | |
| 178 | 178 | @ -- |
| 179 | 179 | @ -- This table contains sensitive information and should not be shared |
| 180 | 180 | @ -- with unauthorized users. |
| 181 | 181 | @ -- |
| 182 | 182 | @ CREATE TABLE concealed( |
| @@ -193,11 +193,11 @@ | ||
| 193 | 193 | /* |
| 194 | 194 | ** The default reportfmt entry for the schema. This is in an extra |
| 195 | 195 | ** script so that (configure reset) can install the default report. |
| 196 | 196 | */ |
| 197 | 197 | const char zRepositorySchemaDefaultReports[] = |
| 198 | -@ INSERT INTO reportfmt(title,mtime,cols,sqlcode) | |
| 198 | +@ INSERT INTO reportfmt(title,mtime,cols,sqlcode) | |
| 199 | 199 | @ VALUES('All Tickets',julianday('1970-01-01'),'#ffffff Key: |
| 200 | 200 | @ #f2dcdc Active |
| 201 | 201 | @ #e8e8e8 Review |
| 202 | 202 | @ #cfe8bd Fixed |
| 203 | 203 | @ #bde5d6 Tested |
| @@ -321,13 +321,13 @@ | ||
| 321 | 321 | @ rid INTEGER PRIMARY KEY -- Record ID of the phantom |
| 322 | 322 | @ ); |
| 323 | 323 | @ |
| 324 | 324 | @ -- Each baseline or manifest can have one or more tags. A tag |
| 325 | 325 | @ -- is defined by a row in the next table. |
| 326 | -@ -- | |
| 326 | +@ -- | |
| 327 | 327 | @ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of |
| 328 | -@ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where | |
| 328 | +@ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where | |
| 329 | 329 | @ -- UUID is the indentifier of the ticket. Tags used to assign symbolic |
| 330 | 330 | @ -- names to baselines are branches are of the form "sym-NAME" where |
| 331 | 331 | @ -- NAME is the symbolic name. |
| 332 | 332 | @ -- |
| 333 | 333 | @ CREATE TABLE tag( |
| 334 | 334 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -21,11 +21,11 @@ | |
| 21 | #include "schema.h" |
| 22 | |
| 23 | /* |
| 24 | ** The database schema for the ~/.fossil configuration database. |
| 25 | */ |
| 26 | const char zConfigSchema[] = |
| 27 | @ -- This file contains the schema for the database that is kept in the |
| 28 | @ -- ~/.fossil file and that stores information about the users setup. |
| 29 | @ -- |
| 30 | @ CREATE TABLE global_config( |
| 31 | @ name TEXT PRIMARY KEY, |
| @@ -50,19 +50,19 @@ | |
| 50 | |
| 51 | #endif /* INTERFACE */ |
| 52 | |
| 53 | |
| 54 | /* |
| 55 | ** The schema for a repository database. |
| 56 | ** |
| 57 | ** Schema1[] contains parts of the schema that are fixed and unchanging |
| 58 | ** across versions. Schema2[] contains parts of the schema that can |
| 59 | ** change from one version to the next. The information in Schema2[] |
| 60 | ** is reconstructed from the information in Schema1[] by the "rebuild" |
| 61 | ** operation. |
| 62 | */ |
| 63 | const char zRepositorySchema1[] = |
| 64 | @ -- The BLOB and DELTA tables contain all records held in the repository. |
| 65 | @ -- |
| 66 | @ -- The BLOB.CONTENT column is always compressed using zlib. This |
| 67 | @ -- column might hold the full text of the record or it might hold |
| 68 | @ -- a delta that is able to reconstruct the record from some other |
| @@ -69,11 +69,11 @@ | |
| 69 | @ -- record. If BLOB.CONTENT holds a delta, then a DELTA table entry |
| 70 | @ -- will exist for the record and that entry will point to another |
| 71 | @ -- entry that holds the source of the delta. Deltas can be chained. |
| 72 | @ -- |
| 73 | @ -- The blob and delta tables collectively hold the "global state" of |
| 74 | @ -- a Fossil repository. |
| 75 | @ -- |
| 76 | @ CREATE TABLE blob( |
| 77 | @ rid INTEGER PRIMARY KEY, -- Record ID |
| 78 | @ rcvid INTEGER, -- Origin of this record |
| 79 | @ size INTEGER, -- Size of content. -1 for a phantom. |
| @@ -89,11 +89,11 @@ | |
| 89 | @ |
| 90 | @ ------------------------------------------------------------------------- |
| 91 | @ -- The BLOB and DELTA tables above hold the "global state" of a Fossil |
| 92 | @ -- project; the stuff that is normally exchanged during "sync". The |
| 93 | @ -- "local state" of a repository is contained in the remaining tables of |
| 94 | @ -- the zRepositorySchema1 string. |
| 95 | @ ------------------------------------------------------------------------- |
| 96 | @ |
| 97 | @ -- Whenever new blobs are received into the repository, an entry |
| 98 | @ -- in this table records the source of the blob. |
| 99 | @ -- |
| @@ -172,11 +172,11 @@ | |
| 172 | @ ); |
| 173 | @ |
| 174 | @ -- Some ticket content (such as the originators email address or contact |
| 175 | @ -- information) needs to be obscured to protect privacy. This is achieved |
| 176 | @ -- by storing an SHA1 hash of the content. For display, the hash is |
| 177 | @ -- mapped back into the original text using this table. |
| 178 | @ -- |
| 179 | @ -- This table contains sensitive information and should not be shared |
| 180 | @ -- with unauthorized users. |
| 181 | @ -- |
| 182 | @ CREATE TABLE concealed( |
| @@ -193,11 +193,11 @@ | |
| 193 | /* |
| 194 | ** The default reportfmt entry for the schema. This is in an extra |
| 195 | ** script so that (configure reset) can install the default report. |
| 196 | */ |
| 197 | const char zRepositorySchemaDefaultReports[] = |
| 198 | @ INSERT INTO reportfmt(title,mtime,cols,sqlcode) |
| 199 | @ VALUES('All Tickets',julianday('1970-01-01'),'#ffffff Key: |
| 200 | @ #f2dcdc Active |
| 201 | @ #e8e8e8 Review |
| 202 | @ #cfe8bd Fixed |
| 203 | @ #bde5d6 Tested |
| @@ -321,13 +321,13 @@ | |
| 321 | @ rid INTEGER PRIMARY KEY -- Record ID of the phantom |
| 322 | @ ); |
| 323 | @ |
| 324 | @ -- Each baseline or manifest can have one or more tags. A tag |
| 325 | @ -- is defined by a row in the next table. |
| 326 | @ -- |
| 327 | @ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of |
| 328 | @ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where |
| 329 | @ -- UUID is the indentifier of the ticket. Tags used to assign symbolic |
| 330 | @ -- names to baselines are branches are of the form "sym-NAME" where |
| 331 | @ -- NAME is the symbolic name. |
| 332 | @ -- |
| 333 | @ CREATE TABLE tag( |
| 334 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -21,11 +21,11 @@ | |
| 21 | #include "schema.h" |
| 22 | |
| 23 | /* |
| 24 | ** The database schema for the ~/.fossil configuration database. |
| 25 | */ |
| 26 | const char zConfigSchema[] = |
| 27 | @ -- This file contains the schema for the database that is kept in the |
| 28 | @ -- ~/.fossil file and that stores information about the users setup. |
| 29 | @ -- |
| 30 | @ CREATE TABLE global_config( |
| 31 | @ name TEXT PRIMARY KEY, |
| @@ -50,19 +50,19 @@ | |
| 50 | |
| 51 | #endif /* INTERFACE */ |
| 52 | |
| 53 | |
| 54 | /* |
| 55 | ** The schema for a repository database. |
| 56 | ** |
| 57 | ** Schema1[] contains parts of the schema that are fixed and unchanging |
| 58 | ** across versions. Schema2[] contains parts of the schema that can |
| 59 | ** change from one version to the next. The information in Schema2[] |
| 60 | ** is reconstructed from the information in Schema1[] by the "rebuild" |
| 61 | ** operation. |
| 62 | */ |
| 63 | const char zRepositorySchema1[] = |
| 64 | @ -- The BLOB and DELTA tables contain all records held in the repository. |
| 65 | @ -- |
| 66 | @ -- The BLOB.CONTENT column is always compressed using zlib. This |
| 67 | @ -- column might hold the full text of the record or it might hold |
| 68 | @ -- a delta that is able to reconstruct the record from some other |
| @@ -69,11 +69,11 @@ | |
| 69 | @ -- record. If BLOB.CONTENT holds a delta, then a DELTA table entry |
| 70 | @ -- will exist for the record and that entry will point to another |
| 71 | @ -- entry that holds the source of the delta. Deltas can be chained. |
| 72 | @ -- |
| 73 | @ -- The blob and delta tables collectively hold the "global state" of |
| 74 | @ -- a Fossil repository. |
| 75 | @ -- |
| 76 | @ CREATE TABLE blob( |
| 77 | @ rid INTEGER PRIMARY KEY, -- Record ID |
| 78 | @ rcvid INTEGER, -- Origin of this record |
| 79 | @ size INTEGER, -- Size of content. -1 for a phantom. |
| @@ -89,11 +89,11 @@ | |
| 89 | @ |
| 90 | @ ------------------------------------------------------------------------- |
| 91 | @ -- The BLOB and DELTA tables above hold the "global state" of a Fossil |
| 92 | @ -- project; the stuff that is normally exchanged during "sync". The |
| 93 | @ -- "local state" of a repository is contained in the remaining tables of |
| 94 | @ -- the zRepositorySchema1 string. |
| 95 | @ ------------------------------------------------------------------------- |
| 96 | @ |
| 97 | @ -- Whenever new blobs are received into the repository, an entry |
| 98 | @ -- in this table records the source of the blob. |
| 99 | @ -- |
| @@ -172,11 +172,11 @@ | |
| 172 | @ ); |
| 173 | @ |
| 174 | @ -- Some ticket content (such as the originators email address or contact |
| 175 | @ -- information) needs to be obscured to protect privacy. This is achieved |
| 176 | @ -- by storing an SHA1 hash of the content. For display, the hash is |
| 177 | @ -- mapped back into the original text using this table. |
| 178 | @ -- |
| 179 | @ -- This table contains sensitive information and should not be shared |
| 180 | @ -- with unauthorized users. |
| 181 | @ -- |
| 182 | @ CREATE TABLE concealed( |
| @@ -193,11 +193,11 @@ | |
| 193 | /* |
| 194 | ** The default reportfmt entry for the schema. This is in an extra |
| 195 | ** script so that (configure reset) can install the default report. |
| 196 | */ |
| 197 | const char zRepositorySchemaDefaultReports[] = |
| 198 | @ INSERT INTO reportfmt(title,mtime,cols,sqlcode) |
| 199 | @ VALUES('All Tickets',julianday('1970-01-01'),'#ffffff Key: |
| 200 | @ #f2dcdc Active |
| 201 | @ #e8e8e8 Review |
| 202 | @ #cfe8bd Fixed |
| 203 | @ #bde5d6 Tested |
| @@ -321,13 +321,13 @@ | |
| 321 | @ rid INTEGER PRIMARY KEY -- Record ID of the phantom |
| 322 | @ ); |
| 323 | @ |
| 324 | @ -- Each baseline or manifest can have one or more tags. A tag |
| 325 | @ -- is defined by a row in the next table. |
| 326 | @ -- |
| 327 | @ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of |
| 328 | @ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where |
| 329 | @ -- UUID is the indentifier of the ticket. Tags used to assign symbolic |
| 330 | @ -- names to baselines are branches are of the form "sym-NAME" where |
| 331 | @ -- NAME is the symbolic name. |
| 332 | @ -- |
| 333 | @ CREATE TABLE tag( |
| 334 |
+7
-7
| --- src/shun.c | ||
| +++ src/shun.c | ||
| @@ -69,11 +69,11 @@ | ||
| 69 | 69 | style_header("Shunned Artifacts"); |
| 70 | 70 | if( zUuid && P("sub") ){ |
| 71 | 71 | login_verify_csrf_secret(); |
| 72 | 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | - @ <p class="noMoreShun">Artifact | |
| 74 | + @ <p class="noMoreShun">Artifact | |
| 75 | 75 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | 76 | @ longer being shunned.</p> |
| 77 | 77 | }else{ |
| 78 | 78 | @ <p class="noMoreShun">Artifact %s(zUuid) will no longer |
| 79 | 79 | @ be shunned. But it does not exist in the repository. It |
| @@ -107,11 +107,11 @@ | ||
| 107 | 107 | } |
| 108 | 108 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 109 | 109 | @ artifact content will be purged from the repository the next time the |
| 110 | 110 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 111 | 111 | @ bottom of this page.</p> |
| 112 | - @ | |
| 112 | + @ | |
| 113 | 113 | @ <a name="addshun"></a> |
| 114 | 114 | @ <p>To shun an artifact, enter its artifact ID (the 40-character SHA1 |
| 115 | 115 | @ hash of the artifact) in the |
| 116 | 116 | @ following box and press the "Shun" button. This will cause the artifact |
| 117 | 117 | @ to be removed from the repository and will prevent the artifact from being |
| @@ -124,11 +124,11 @@ | ||
| 124 | 124 | @ from the repository. Inappropriate content includes such things as |
| 125 | 125 | @ spam added to Wiki, files that violate copyright or patent agreements, |
| 126 | 126 | @ or artifacts that by design or accident interfere with the processing |
| 127 | 127 | @ of the repository. Do not shun artifacts merely to remove them from |
| 128 | 128 | @ sight - set the "hidden" tag on such artifacts instead.</p> |
| 129 | - @ | |
| 129 | + @ | |
| 130 | 130 | @ <blockquote> |
| 131 | 131 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 132 | 132 | login_insert_csrf_secret(); |
| 133 | 133 | @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" /> |
| 134 | 134 | @ <input type="submit" name="add" value="Shun" /> |
| @@ -159,14 +159,14 @@ | ||
| 159 | 159 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 160 | 160 | login_insert_csrf_secret(); |
| 161 | 161 | @ <input type="submit" name="rebuild" value="Rebuild" /> |
| 162 | 162 | @ </div></form> |
| 163 | 163 | @ </blockquote> |
| 164 | - @ | |
| 164 | + @ | |
| 165 | 165 | @ <hr /><p>Shunned Artifacts:</p> |
| 166 | 166 | @ <blockquote><p> |
| 167 | - db_prepare(&q, | |
| 167 | + db_prepare(&q, | |
| 168 | 168 | "SELECT uuid, EXISTS(SELECT 1 FROM blob WHERE blob.uuid=shun.uuid)" |
| 169 | 169 | " FROM shun ORDER BY uuid"); |
| 170 | 170 | while( db_step(&q)==SQLITE_ROW ){ |
| 171 | 171 | const char *zUuid = db_column_text(&q, 0); |
| 172 | 172 | int stillExists = db_column_int(&q, 1); |
| @@ -228,11 +228,11 @@ | ||
| 228 | 228 | style_header("Content Sources"); |
| 229 | 229 | if( ofst>0 ){ |
| 230 | 230 | style_submenu_element("Newer", "Newer", "rcvfromlist?ofst=%d", |
| 231 | 231 | ofst>30 ? ofst-30 : 0); |
| 232 | 232 | } |
| 233 | - db_prepare(&q, | |
| 233 | + db_prepare(&q, | |
| 234 | 234 | "SELECT rcvid, login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 235 | 235 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 236 | 236 | " ORDER BY rcvid DESC LIMIT 31 OFFSET %d", |
| 237 | 237 | ofst |
| 238 | 238 | ); |
| @@ -287,11 +287,11 @@ | ||
| 287 | 287 | login_check_credentials(); |
| 288 | 288 | if( !g.perm.Admin ){ |
| 289 | 289 | login_needed(); |
| 290 | 290 | } |
| 291 | 291 | style_header("Content Source %d", rcvid); |
| 292 | - db_prepare(&q, | |
| 292 | + db_prepare(&q, | |
| 293 | 293 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 294 | 294 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 295 | 295 | " WHERE rcvid=%d", |
| 296 | 296 | rcvid |
| 297 | 297 | ); |
| 298 | 298 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -69,11 +69,11 @@ | |
| 69 | style_header("Shunned Artifacts"); |
| 70 | if( zUuid && P("sub") ){ |
| 71 | login_verify_csrf_secret(); |
| 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | @ <p class="noMoreShun">Artifact |
| 75 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | @ longer being shunned.</p> |
| 77 | }else{ |
| 78 | @ <p class="noMoreShun">Artifact %s(zUuid) will no longer |
| 79 | @ be shunned. But it does not exist in the repository. It |
| @@ -107,11 +107,11 @@ | |
| 107 | } |
| 108 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 109 | @ artifact content will be purged from the repository the next time the |
| 110 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 111 | @ bottom of this page.</p> |
| 112 | @ |
| 113 | @ <a name="addshun"></a> |
| 114 | @ <p>To shun an artifact, enter its artifact ID (the 40-character SHA1 |
| 115 | @ hash of the artifact) in the |
| 116 | @ following box and press the "Shun" button. This will cause the artifact |
| 117 | @ to be removed from the repository and will prevent the artifact from being |
| @@ -124,11 +124,11 @@ | |
| 124 | @ from the repository. Inappropriate content includes such things as |
| 125 | @ spam added to Wiki, files that violate copyright or patent agreements, |
| 126 | @ or artifacts that by design or accident interfere with the processing |
| 127 | @ of the repository. Do not shun artifacts merely to remove them from |
| 128 | @ sight - set the "hidden" tag on such artifacts instead.</p> |
| 129 | @ |
| 130 | @ <blockquote> |
| 131 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 132 | login_insert_csrf_secret(); |
| 133 | @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" /> |
| 134 | @ <input type="submit" name="add" value="Shun" /> |
| @@ -159,14 +159,14 @@ | |
| 159 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 160 | login_insert_csrf_secret(); |
| 161 | @ <input type="submit" name="rebuild" value="Rebuild" /> |
| 162 | @ </div></form> |
| 163 | @ </blockquote> |
| 164 | @ |
| 165 | @ <hr /><p>Shunned Artifacts:</p> |
| 166 | @ <blockquote><p> |
| 167 | db_prepare(&q, |
| 168 | "SELECT uuid, EXISTS(SELECT 1 FROM blob WHERE blob.uuid=shun.uuid)" |
| 169 | " FROM shun ORDER BY uuid"); |
| 170 | while( db_step(&q)==SQLITE_ROW ){ |
| 171 | const char *zUuid = db_column_text(&q, 0); |
| 172 | int stillExists = db_column_int(&q, 1); |
| @@ -228,11 +228,11 @@ | |
| 228 | style_header("Content Sources"); |
| 229 | if( ofst>0 ){ |
| 230 | style_submenu_element("Newer", "Newer", "rcvfromlist?ofst=%d", |
| 231 | ofst>30 ? ofst-30 : 0); |
| 232 | } |
| 233 | db_prepare(&q, |
| 234 | "SELECT rcvid, login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 235 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 236 | " ORDER BY rcvid DESC LIMIT 31 OFFSET %d", |
| 237 | ofst |
| 238 | ); |
| @@ -287,11 +287,11 @@ | |
| 287 | login_check_credentials(); |
| 288 | if( !g.perm.Admin ){ |
| 289 | login_needed(); |
| 290 | } |
| 291 | style_header("Content Source %d", rcvid); |
| 292 | db_prepare(&q, |
| 293 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 294 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 295 | " WHERE rcvid=%d", |
| 296 | rcvid |
| 297 | ); |
| 298 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -69,11 +69,11 @@ | |
| 69 | style_header("Shunned Artifacts"); |
| 70 | if( zUuid && P("sub") ){ |
| 71 | login_verify_csrf_secret(); |
| 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | @ <p class="noMoreShun">Artifact |
| 75 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | @ longer being shunned.</p> |
| 77 | }else{ |
| 78 | @ <p class="noMoreShun">Artifact %s(zUuid) will no longer |
| 79 | @ be shunned. But it does not exist in the repository. It |
| @@ -107,11 +107,11 @@ | |
| 107 | } |
| 108 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 109 | @ artifact content will be purged from the repository the next time the |
| 110 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 111 | @ bottom of this page.</p> |
| 112 | @ |
| 113 | @ <a name="addshun"></a> |
| 114 | @ <p>To shun an artifact, enter its artifact ID (the 40-character SHA1 |
| 115 | @ hash of the artifact) in the |
| 116 | @ following box and press the "Shun" button. This will cause the artifact |
| 117 | @ to be removed from the repository and will prevent the artifact from being |
| @@ -124,11 +124,11 @@ | |
| 124 | @ from the repository. Inappropriate content includes such things as |
| 125 | @ spam added to Wiki, files that violate copyright or patent agreements, |
| 126 | @ or artifacts that by design or accident interfere with the processing |
| 127 | @ of the repository. Do not shun artifacts merely to remove them from |
| 128 | @ sight - set the "hidden" tag on such artifacts instead.</p> |
| 129 | @ |
| 130 | @ <blockquote> |
| 131 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 132 | login_insert_csrf_secret(); |
| 133 | @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" /> |
| 134 | @ <input type="submit" name="add" value="Shun" /> |
| @@ -159,14 +159,14 @@ | |
| 159 | @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div> |
| 160 | login_insert_csrf_secret(); |
| 161 | @ <input type="submit" name="rebuild" value="Rebuild" /> |
| 162 | @ </div></form> |
| 163 | @ </blockquote> |
| 164 | @ |
| 165 | @ <hr /><p>Shunned Artifacts:</p> |
| 166 | @ <blockquote><p> |
| 167 | db_prepare(&q, |
| 168 | "SELECT uuid, EXISTS(SELECT 1 FROM blob WHERE blob.uuid=shun.uuid)" |
| 169 | " FROM shun ORDER BY uuid"); |
| 170 | while( db_step(&q)==SQLITE_ROW ){ |
| 171 | const char *zUuid = db_column_text(&q, 0); |
| 172 | int stillExists = db_column_int(&q, 1); |
| @@ -228,11 +228,11 @@ | |
| 228 | style_header("Content Sources"); |
| 229 | if( ofst>0 ){ |
| 230 | style_submenu_element("Newer", "Newer", "rcvfromlist?ofst=%d", |
| 231 | ofst>30 ? ofst-30 : 0); |
| 232 | } |
| 233 | db_prepare(&q, |
| 234 | "SELECT rcvid, login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 235 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 236 | " ORDER BY rcvid DESC LIMIT 31 OFFSET %d", |
| 237 | ofst |
| 238 | ); |
| @@ -287,11 +287,11 @@ | |
| 287 | login_check_credentials(); |
| 288 | if( !g.perm.Admin ){ |
| 289 | login_needed(); |
| 290 | } |
| 291 | style_header("Content Source %d", rcvid); |
| 292 | db_prepare(&q, |
| 293 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 294 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 295 | " WHERE rcvid=%d", |
| 296 | rcvid |
| 297 | ); |
| 298 |
+20
-20
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | } |
| 62 | 62 | return -1; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /* |
| 66 | -** Obtain a list of all fields of the TICKET and TICKETCHNG tables. Put them | |
| 66 | +** Obtain a list of all fields of the TICKET and TICKETCHNG tables. Put them | |
| 67 | 67 | ** in sorted order in aField[]. |
| 68 | 68 | ** |
| 69 | 69 | ** The haveTicket and haveTicketChng variables are set to 1 if the TICKET and |
| 70 | 70 | ** TICKETCHANGE tables exist, respectively. |
| 71 | 71 | */ |
| @@ -429,15 +429,15 @@ | ||
| 429 | 429 | if( g.perm.WrTkt || g.perm.ApndTkt ){ |
| 430 | 430 | style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T", |
| 431 | 431 | g.zTop, PD("name","")); |
| 432 | 432 | } |
| 433 | 433 | if( g.perm.Hyperlink ){ |
| 434 | - style_submenu_element("History", "History Of This Ticket", | |
| 434 | + style_submenu_element("History", "History Of This Ticket", | |
| 435 | 435 | "%s/tkthistory/%T", g.zTop, zUuid); |
| 436 | - style_submenu_element("Timeline", "Timeline Of This Ticket", | |
| 436 | + style_submenu_element("Timeline", "Timeline Of This Ticket", | |
| 437 | 437 | "%s/tkttimeline/%T", g.zTop, zUuid); |
| 438 | - style_submenu_element("Check-ins", "Check-ins Of This Ticket", | |
| 438 | + style_submenu_element("Check-ins", "Check-ins Of This Ticket", | |
| 439 | 439 | "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); |
| 440 | 440 | } |
| 441 | 441 | if( g.perm.NewTkt ){ |
| 442 | 442 | style_submenu_element("New Ticket", "Create a new ticket", |
| 443 | 443 | "%s/tktnew", g.zTop); |
| @@ -463,17 +463,17 @@ | ||
| 463 | 463 | if( P("showfields")!=0 ) showAllFields(); |
| 464 | 464 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW_SCRIPT<br />\n", -1); |
| 465 | 465 | Th_Render(zScript); |
| 466 | 466 | if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1); |
| 467 | 467 | |
| 468 | - zFullName = db_text(0, | |
| 468 | + zFullName = db_text(0, | |
| 469 | 469 | "SELECT tkt_uuid FROM ticket" |
| 470 | 470 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 471 | 471 | if( zFullName ){ |
| 472 | 472 | attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>"); |
| 473 | 473 | } |
| 474 | - | |
| 474 | + | |
| 475 | 475 | style_footer(); |
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | /* |
| 479 | 479 | ** TH command: append_field FIELD STRING |
| @@ -482,14 +482,14 @@ | ||
| 482 | 482 | ** to append text. STRING is the text to be appended to that |
| 483 | 483 | ** column. The append does not actually occur until the |
| 484 | 484 | ** submit_ticket command is run. |
| 485 | 485 | */ |
| 486 | 486 | static int appendRemarkCmd( |
| 487 | - Th_Interp *interp, | |
| 488 | - void *p, | |
| 489 | - int argc, | |
| 490 | - const char **argv, | |
| 487 | + Th_Interp *interp, | |
| 488 | + void *p, | |
| 489 | + int argc, | |
| 490 | + const char **argv, | |
| 491 | 491 | int *argl |
| 492 | 492 | ){ |
| 493 | 493 | int idx; |
| 494 | 494 | |
| 495 | 495 | if( argc!=3 ){ |
| @@ -555,14 +555,14 @@ | ||
| 555 | 555 | ** taken from TH variables. If the content is unchanged, the field is |
| 556 | 556 | ** omitted from the artifact. Fields whose names begin with "private_" |
| 557 | 557 | ** are concealed using the db_conceal() function. |
| 558 | 558 | */ |
| 559 | 559 | static int submitTicketCmd( |
| 560 | - Th_Interp *interp, | |
| 561 | - void *pUuid, | |
| 562 | - int argc, | |
| 563 | - const char **argv, | |
| 560 | + Th_Interp *interp, | |
| 561 | + void *pUuid, | |
| 562 | + int argc, | |
| 563 | + const char **argv, | |
| 564 | 564 | int *argl |
| 565 | 565 | ){ |
| 566 | 566 | char *zDate; |
| 567 | 567 | const char *zUuid; |
| 568 | 568 | int i; |
| @@ -606,11 +606,11 @@ | ||
| 606 | 606 | nJ++; |
| 607 | 607 | } |
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | if( *(char**)pUuid ){ |
| 611 | - zUuid = db_text(0, | |
| 611 | + zUuid = db_text(0, | |
| 612 | 612 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%q*'", P("name") |
| 613 | 613 | ); |
| 614 | 614 | }else{ |
| 615 | 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | 616 | } |
| @@ -939,14 +939,14 @@ | ||
| 939 | 939 | nChng++; |
| 940 | 940 | if( zFile!=0 ){ |
| 941 | 941 | const char *zSrc = db_column_text(&q, 3); |
| 942 | 942 | const char *zUser = db_column_text(&q, 5); |
| 943 | 943 | if( zSrc==0 || zSrc[0]==0 ){ |
| 944 | - @ | |
| 944 | + @ | |
| 945 | 945 | @ <li><p>Delete attachment "%h(zFile)" |
| 946 | 946 | }else{ |
| 947 | - @ | |
| 947 | + @ | |
| 948 | 948 | @ <li><p>Add attachment |
| 949 | 949 | @ "%z(href("%R/artifact/%S",zSrc))%s(zFile)</a>" |
| 950 | 950 | } |
| 951 | 951 | @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] |
| 952 | 952 | @ (rid %d(rid)) by |
| @@ -1151,11 +1151,11 @@ | ||
| 1151 | 1151 | }else{ |
| 1152 | 1152 | /* add a new ticket or set fields on existing tickets */ |
| 1153 | 1153 | tTktShowEncoding tktEncoding; |
| 1154 | 1154 | |
| 1155 | 1155 | tktEncoding = find_option("quote","q",0) ? tktFossilize : tktNoTab; |
| 1156 | - | |
| 1156 | + | |
| 1157 | 1157 | if( strncmp(g.argv[2],"show",n)==0 ){ |
| 1158 | 1158 | if( g.argc==3 ){ |
| 1159 | 1159 | usage("show REPORTNR"); |
| 1160 | 1160 | }else{ |
| 1161 | 1161 | const char *zRep = 0; |
| @@ -1186,11 +1186,11 @@ | ||
| 1186 | 1186 | eCmd = set; |
| 1187 | 1187 | } |
| 1188 | 1188 | if( g.argc==3 ){ |
| 1189 | 1189 | usage("set|change|history TICKETUUID"); |
| 1190 | 1190 | } |
| 1191 | - zTktUuid = db_text(0, | |
| 1191 | + zTktUuid = db_text(0, | |
| 1192 | 1192 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3] |
| 1193 | 1193 | ); |
| 1194 | 1194 | if( !zTktUuid ){ |
| 1195 | 1195 | fossil_fatal("unknown ticket: '%s'!",g.argv[3]); |
| 1196 | 1196 | } |
| @@ -1217,11 +1217,11 @@ | ||
| 1217 | 1217 | } |
| 1218 | 1218 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'", |
| 1219 | 1219 | zTktUuid); |
| 1220 | 1220 | if( tagid==0 ){ |
| 1221 | 1221 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1222 | - } | |
| 1222 | + } | |
| 1223 | 1223 | db_prepare(&q, |
| 1224 | 1224 | "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL" |
| 1225 | 1225 | " FROM event, blob" |
| 1226 | 1226 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1227 | 1227 | " AND blob.rid=event.objid" |
| 1228 | 1228 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -61,11 +61,11 @@ | |
| 61 | } |
| 62 | return -1; |
| 63 | } |
| 64 | |
| 65 | /* |
| 66 | ** Obtain a list of all fields of the TICKET and TICKETCHNG tables. Put them |
| 67 | ** in sorted order in aField[]. |
| 68 | ** |
| 69 | ** The haveTicket and haveTicketChng variables are set to 1 if the TICKET and |
| 70 | ** TICKETCHANGE tables exist, respectively. |
| 71 | */ |
| @@ -429,15 +429,15 @@ | |
| 429 | if( g.perm.WrTkt || g.perm.ApndTkt ){ |
| 430 | style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T", |
| 431 | g.zTop, PD("name","")); |
| 432 | } |
| 433 | if( g.perm.Hyperlink ){ |
| 434 | style_submenu_element("History", "History Of This Ticket", |
| 435 | "%s/tkthistory/%T", g.zTop, zUuid); |
| 436 | style_submenu_element("Timeline", "Timeline Of This Ticket", |
| 437 | "%s/tkttimeline/%T", g.zTop, zUuid); |
| 438 | style_submenu_element("Check-ins", "Check-ins Of This Ticket", |
| 439 | "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); |
| 440 | } |
| 441 | if( g.perm.NewTkt ){ |
| 442 | style_submenu_element("New Ticket", "Create a new ticket", |
| 443 | "%s/tktnew", g.zTop); |
| @@ -463,17 +463,17 @@ | |
| 463 | if( P("showfields")!=0 ) showAllFields(); |
| 464 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW_SCRIPT<br />\n", -1); |
| 465 | Th_Render(zScript); |
| 466 | if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1); |
| 467 | |
| 468 | zFullName = db_text(0, |
| 469 | "SELECT tkt_uuid FROM ticket" |
| 470 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 471 | if( zFullName ){ |
| 472 | attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>"); |
| 473 | } |
| 474 | |
| 475 | style_footer(); |
| 476 | } |
| 477 | |
| 478 | /* |
| 479 | ** TH command: append_field FIELD STRING |
| @@ -482,14 +482,14 @@ | |
| 482 | ** to append text. STRING is the text to be appended to that |
| 483 | ** column. The append does not actually occur until the |
| 484 | ** submit_ticket command is run. |
| 485 | */ |
| 486 | static int appendRemarkCmd( |
| 487 | Th_Interp *interp, |
| 488 | void *p, |
| 489 | int argc, |
| 490 | const char **argv, |
| 491 | int *argl |
| 492 | ){ |
| 493 | int idx; |
| 494 | |
| 495 | if( argc!=3 ){ |
| @@ -555,14 +555,14 @@ | |
| 555 | ** taken from TH variables. If the content is unchanged, the field is |
| 556 | ** omitted from the artifact. Fields whose names begin with "private_" |
| 557 | ** are concealed using the db_conceal() function. |
| 558 | */ |
| 559 | static int submitTicketCmd( |
| 560 | Th_Interp *interp, |
| 561 | void *pUuid, |
| 562 | int argc, |
| 563 | const char **argv, |
| 564 | int *argl |
| 565 | ){ |
| 566 | char *zDate; |
| 567 | const char *zUuid; |
| 568 | int i; |
| @@ -606,11 +606,11 @@ | |
| 606 | nJ++; |
| 607 | } |
| 608 | } |
| 609 | } |
| 610 | if( *(char**)pUuid ){ |
| 611 | zUuid = db_text(0, |
| 612 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%q*'", P("name") |
| 613 | ); |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| @@ -939,14 +939,14 @@ | |
| 939 | nChng++; |
| 940 | if( zFile!=0 ){ |
| 941 | const char *zSrc = db_column_text(&q, 3); |
| 942 | const char *zUser = db_column_text(&q, 5); |
| 943 | if( zSrc==0 || zSrc[0]==0 ){ |
| 944 | @ |
| 945 | @ <li><p>Delete attachment "%h(zFile)" |
| 946 | }else{ |
| 947 | @ |
| 948 | @ <li><p>Add attachment |
| 949 | @ "%z(href("%R/artifact/%S",zSrc))%s(zFile)</a>" |
| 950 | } |
| 951 | @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] |
| 952 | @ (rid %d(rid)) by |
| @@ -1151,11 +1151,11 @@ | |
| 1151 | }else{ |
| 1152 | /* add a new ticket or set fields on existing tickets */ |
| 1153 | tTktShowEncoding tktEncoding; |
| 1154 | |
| 1155 | tktEncoding = find_option("quote","q",0) ? tktFossilize : tktNoTab; |
| 1156 | |
| 1157 | if( strncmp(g.argv[2],"show",n)==0 ){ |
| 1158 | if( g.argc==3 ){ |
| 1159 | usage("show REPORTNR"); |
| 1160 | }else{ |
| 1161 | const char *zRep = 0; |
| @@ -1186,11 +1186,11 @@ | |
| 1186 | eCmd = set; |
| 1187 | } |
| 1188 | if( g.argc==3 ){ |
| 1189 | usage("set|change|history TICKETUUID"); |
| 1190 | } |
| 1191 | zTktUuid = db_text(0, |
| 1192 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3] |
| 1193 | ); |
| 1194 | if( !zTktUuid ){ |
| 1195 | fossil_fatal("unknown ticket: '%s'!",g.argv[3]); |
| 1196 | } |
| @@ -1217,11 +1217,11 @@ | |
| 1217 | } |
| 1218 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'", |
| 1219 | zTktUuid); |
| 1220 | if( tagid==0 ){ |
| 1221 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1222 | } |
| 1223 | db_prepare(&q, |
| 1224 | "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL" |
| 1225 | " FROM event, blob" |
| 1226 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1227 | " AND blob.rid=event.objid" |
| 1228 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -61,11 +61,11 @@ | |
| 61 | } |
| 62 | return -1; |
| 63 | } |
| 64 | |
| 65 | /* |
| 66 | ** Obtain a list of all fields of the TICKET and TICKETCHNG tables. Put them |
| 67 | ** in sorted order in aField[]. |
| 68 | ** |
| 69 | ** The haveTicket and haveTicketChng variables are set to 1 if the TICKET and |
| 70 | ** TICKETCHANGE tables exist, respectively. |
| 71 | */ |
| @@ -429,15 +429,15 @@ | |
| 429 | if( g.perm.WrTkt || g.perm.ApndTkt ){ |
| 430 | style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T", |
| 431 | g.zTop, PD("name","")); |
| 432 | } |
| 433 | if( g.perm.Hyperlink ){ |
| 434 | style_submenu_element("History", "History Of This Ticket", |
| 435 | "%s/tkthistory/%T", g.zTop, zUuid); |
| 436 | style_submenu_element("Timeline", "Timeline Of This Ticket", |
| 437 | "%s/tkttimeline/%T", g.zTop, zUuid); |
| 438 | style_submenu_element("Check-ins", "Check-ins Of This Ticket", |
| 439 | "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); |
| 440 | } |
| 441 | if( g.perm.NewTkt ){ |
| 442 | style_submenu_element("New Ticket", "Create a new ticket", |
| 443 | "%s/tktnew", g.zTop); |
| @@ -463,17 +463,17 @@ | |
| 463 | if( P("showfields")!=0 ) showAllFields(); |
| 464 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW_SCRIPT<br />\n", -1); |
| 465 | Th_Render(zScript); |
| 466 | if( g.thTrace ) Th_Trace("END_TKTVIEW<br />\n", -1); |
| 467 | |
| 468 | zFullName = db_text(0, |
| 469 | "SELECT tkt_uuid FROM ticket" |
| 470 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 471 | if( zFullName ){ |
| 472 | attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>"); |
| 473 | } |
| 474 | |
| 475 | style_footer(); |
| 476 | } |
| 477 | |
| 478 | /* |
| 479 | ** TH command: append_field FIELD STRING |
| @@ -482,14 +482,14 @@ | |
| 482 | ** to append text. STRING is the text to be appended to that |
| 483 | ** column. The append does not actually occur until the |
| 484 | ** submit_ticket command is run. |
| 485 | */ |
| 486 | static int appendRemarkCmd( |
| 487 | Th_Interp *interp, |
| 488 | void *p, |
| 489 | int argc, |
| 490 | const char **argv, |
| 491 | int *argl |
| 492 | ){ |
| 493 | int idx; |
| 494 | |
| 495 | if( argc!=3 ){ |
| @@ -555,14 +555,14 @@ | |
| 555 | ** taken from TH variables. If the content is unchanged, the field is |
| 556 | ** omitted from the artifact. Fields whose names begin with "private_" |
| 557 | ** are concealed using the db_conceal() function. |
| 558 | */ |
| 559 | static int submitTicketCmd( |
| 560 | Th_Interp *interp, |
| 561 | void *pUuid, |
| 562 | int argc, |
| 563 | const char **argv, |
| 564 | int *argl |
| 565 | ){ |
| 566 | char *zDate; |
| 567 | const char *zUuid; |
| 568 | int i; |
| @@ -606,11 +606,11 @@ | |
| 606 | nJ++; |
| 607 | } |
| 608 | } |
| 609 | } |
| 610 | if( *(char**)pUuid ){ |
| 611 | zUuid = db_text(0, |
| 612 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%q*'", P("name") |
| 613 | ); |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| @@ -939,14 +939,14 @@ | |
| 939 | nChng++; |
| 940 | if( zFile!=0 ){ |
| 941 | const char *zSrc = db_column_text(&q, 3); |
| 942 | const char *zUser = db_column_text(&q, 5); |
| 943 | if( zSrc==0 || zSrc[0]==0 ){ |
| 944 | @ |
| 945 | @ <li><p>Delete attachment "%h(zFile)" |
| 946 | }else{ |
| 947 | @ |
| 948 | @ <li><p>Add attachment |
| 949 | @ "%z(href("%R/artifact/%S",zSrc))%s(zFile)</a>" |
| 950 | } |
| 951 | @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] |
| 952 | @ (rid %d(rid)) by |
| @@ -1151,11 +1151,11 @@ | |
| 1151 | }else{ |
| 1152 | /* add a new ticket or set fields on existing tickets */ |
| 1153 | tTktShowEncoding tktEncoding; |
| 1154 | |
| 1155 | tktEncoding = find_option("quote","q",0) ? tktFossilize : tktNoTab; |
| 1156 | |
| 1157 | if( strncmp(g.argv[2],"show",n)==0 ){ |
| 1158 | if( g.argc==3 ){ |
| 1159 | usage("show REPORTNR"); |
| 1160 | }else{ |
| 1161 | const char *zRep = 0; |
| @@ -1186,11 +1186,11 @@ | |
| 1186 | eCmd = set; |
| 1187 | } |
| 1188 | if( g.argc==3 ){ |
| 1189 | usage("set|change|history TICKETUUID"); |
| 1190 | } |
| 1191 | zTktUuid = db_text(0, |
| 1192 | "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3] |
| 1193 | ); |
| 1194 | if( !zTktUuid ){ |
| 1195 | fossil_fatal("unknown ticket: '%s'!",g.argv[3]); |
| 1196 | } |
| @@ -1217,11 +1217,11 @@ | |
| 1217 | } |
| 1218 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'", |
| 1219 | zTktUuid); |
| 1220 | if( tagid==0 ){ |
| 1221 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1222 | } |
| 1223 | db_prepare(&q, |
| 1224 | "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL" |
| 1225 | " FROM event, blob" |
| 1226 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1227 | " AND blob.rid=event.objid" |
| 1228 |
+31
-31
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -115,11 +115,11 @@ | ||
| 115 | 115 | void (*xRebuild)(void), /* Run after successful update */ |
| 116 | 116 | int height /* Height of the edit box */ |
| 117 | 117 | ){ |
| 118 | 118 | const char *z; |
| 119 | 119 | int isSubmit; |
| 120 | - | |
| 120 | + | |
| 121 | 121 | login_check_credentials(); |
| 122 | 122 | if( !g.perm.Setup ){ |
| 123 | 123 | login_needed(); |
| 124 | 124 | } |
| 125 | 125 | if( P("setup") ){ |
| @@ -314,43 +314,43 @@ | ||
| 314 | 314 | @ <td colspan="3"> |
| 315 | 315 | @ Enter a one-line summary of the ticket:<br /> |
| 316 | 316 | @ <input type="text" name="title" size="60" value="$<title>" /> |
| 317 | 317 | @ </td> |
| 318 | 318 | @ </tr> |
| 319 | -@ | |
| 319 | +@ | |
| 320 | 320 | @ <tr> |
| 321 | 321 | @ <td align="right">Type:</td> |
| 322 | 322 | @ <td align="left"><th1>combobox type $type_choices 1</th1></td> |
| 323 | 323 | @ <td align="left">What type of ticket is this?</td> |
| 324 | 324 | @ </tr> |
| 325 | -@ | |
| 325 | +@ | |
| 326 | 326 | @ <tr> |
| 327 | 327 | @ <td align="right">Version:</td> |
| 328 | 328 | @ <td align="left"> |
| 329 | 329 | @ <input type="text" name="foundin" size="20" value="$<foundin>" /> |
| 330 | 330 | @ </td> |
| 331 | 331 | @ <td align="left">In what version or build number do you observe |
| 332 | 332 | @ the problem?</td> |
| 333 | 333 | @ </tr> |
| 334 | -@ | |
| 334 | +@ | |
| 335 | 335 | @ <tr> |
| 336 | 336 | @ <td align="right">Severity:</td> |
| 337 | 337 | @ <td align="left"><th1>combobox severity $severity_choices 1</th1></td> |
| 338 | 338 | @ <td align="left">How debilitating is the problem? How badly does the problem |
| 339 | 339 | @ affect the operation of the product?</td> |
| 340 | 340 | @ </tr> |
| 341 | -@ | |
| 341 | +@ | |
| 342 | 342 | @ <tr> |
| 343 | 343 | @ <td align="right">EMail:</td> |
| 344 | 344 | @ <td align="left"> |
| 345 | 345 | @ <input type="text" name="private_contact" value="$<private_contact>" |
| 346 | 346 | @ size="30" /> |
| 347 | 347 | @ </td> |
| 348 | 348 | @ <td align="left"><u>Not publicly visible</u> |
| 349 | 349 | @ Used by developers to contact you with questions.</td> |
| 350 | 350 | @ </tr> |
| 351 | -@ | |
| 351 | +@ | |
| 352 | 352 | @ <tr> |
| 353 | 353 | @ <td colspan="3"> |
| 354 | 354 | @ Enter a detailed description of the problem. |
| 355 | 355 | @ For code defects, be sure to provide details on exactly how |
| 356 | 356 | @ the problem can be reproduced. Provide as much detail as |
| @@ -359,11 +359,11 @@ | ||
| 359 | 359 | @ <br /> |
| 360 | 360 | @ <th1>set nline [linecount $comment 50 10]</th1> |
| 361 | 361 | @ <textarea name="icomment" cols="80" rows="$nline" |
| 362 | 362 | @ wrap="virtual" class="wikiedit">$<icomment></textarea><br /> |
| 363 | 363 | @ </tr> |
| 364 | -@ | |
| 364 | +@ | |
| 365 | 365 | @ <th1>enable_output [info exists preview]</th1> |
| 366 | 366 | @ <tr><td colspan="3"> |
| 367 | 367 | @ Description Preview:<br /><hr /> |
| 368 | 368 | @ <th1> |
| 369 | 369 | @ if {$mutype eq "Wiki"} { |
| @@ -378,28 +378,28 @@ | ||
| 378 | 378 | @ wiki "<nowiki>$icomment\n</nowiki>" |
| 379 | 379 | @ } |
| 380 | 380 | @ </th1> |
| 381 | 381 | @ <hr /></td></tr> |
| 382 | 382 | @ <th1>enable_output 1</th1> |
| 383 | -@ | |
| 383 | +@ | |
| 384 | 384 | @ <tr> |
| 385 | 385 | @ <td><td align="left"> |
| 386 | 386 | @ <input type="submit" name="preview" value="Preview" /> |
| 387 | 387 | @ </td> |
| 388 | 388 | @ <td align="left">See how the description will appear after formatting.</td> |
| 389 | 389 | @ </tr> |
| 390 | -@ | |
| 390 | +@ | |
| 391 | 391 | @ <th1>enable_output [info exists preview]</th1> |
| 392 | 392 | @ <tr> |
| 393 | 393 | @ <td><td align="left"> |
| 394 | 394 | @ <input type="submit" name="submit" value="Submit" /> |
| 395 | 395 | @ </td> |
| 396 | -@ <td align="left">After filling in the information above, press this | |
| 396 | +@ <td align="left">After filling in the information above, press this | |
| 397 | 397 | @ button to create the new ticket</td> |
| 398 | 398 | @ </tr> |
| 399 | 399 | @ <th1>enable_output 1</th1> |
| 400 | -@ | |
| 400 | +@ | |
| 401 | 401 | @ <tr> |
| 402 | 402 | @ <td><td align="left"> |
| 403 | 403 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 404 | 404 | @ </td> |
| 405 | 405 | @ <td>Abandon and forget this ticket</td> |
| @@ -477,11 +477,11 @@ | ||
| 477 | 477 | @ </tr> |
| 478 | 478 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 479 | 479 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 480 | 480 | @ $<foundin> |
| 481 | 481 | @ </td></tr> |
| 482 | -@ | |
| 482 | +@ | |
| 483 | 483 | @ <th1> |
| 484 | 484 | @ if {[info exists comment] && [string length $comment]>10} { |
| 485 | 485 | @ html { |
| 486 | 486 | @ <tr><td class="tktDspLabel">Description:</td></tr> |
| 487 | 487 | @ <tr><td colspan="5" class="tktDspValue"> |
| @@ -577,55 +577,55 @@ | ||
| 577 | 577 | @ </th1> |
| 578 | 578 | @ <table cellpadding="5"> |
| 579 | 579 | @ <tr><td class="tktDspLabel">Title:</td><td> |
| 580 | 580 | @ <input type="text" name="title" value="$<title>" size="60" /> |
| 581 | 581 | @ </td></tr> |
| 582 | -@ | |
| 582 | +@ | |
| 583 | 583 | @ <tr><td class="tktDspLabel">Status:</td><td> |
| 584 | 584 | @ <th1>combobox status $status_choices 1</th1> |
| 585 | 585 | @ </td></tr> |
| 586 | -@ | |
| 586 | +@ | |
| 587 | 587 | @ <tr><td class="tktDspLabel">Type:</td><td> |
| 588 | 588 | @ <th1>combobox type $type_choices 1</th1> |
| 589 | 589 | @ </td></tr> |
| 590 | -@ | |
| 590 | +@ | |
| 591 | 591 | @ <tr><td class="tktDspLabel">Severity:</td><td> |
| 592 | 592 | @ <th1>combobox severity $severity_choices 1</th1> |
| 593 | 593 | @ </td></tr> |
| 594 | -@ | |
| 594 | +@ | |
| 595 | 595 | @ <tr><td class="tktDspLabel">Priority:</td><td> |
| 596 | 596 | @ <th1>combobox priority $priority_choices 1</th1> |
| 597 | 597 | @ </td></tr> |
| 598 | -@ | |
| 598 | +@ | |
| 599 | 599 | @ <tr><td class="tktDspLabel">Resolution:</td><td> |
| 600 | 600 | @ <th1>combobox resolution $resolution_choices 1</th1> |
| 601 | 601 | @ </td></tr> |
| 602 | -@ | |
| 602 | +@ | |
| 603 | 603 | @ <tr><td class="tktDspLabel">Subsystem:</td><td> |
| 604 | 604 | @ <th1>combobox subsystem $subsystem_choices 1</th1> |
| 605 | 605 | @ </td></tr> |
| 606 | -@ | |
| 606 | +@ | |
| 607 | 607 | @ <th1>enable_output [hascap e]</th1> |
| 608 | 608 | @ <tr><td class="tktDspLabel">Contact:</td><td> |
| 609 | 609 | @ <input type="text" name="private_contact" size="40" |
| 610 | 610 | @ value="$<private_contact>" /> |
| 611 | 611 | @ </td></tr> |
| 612 | 612 | @ <th1>enable_output 1</th1> |
| 613 | -@ | |
| 613 | +@ | |
| 614 | 614 | @ <tr><td class="tktDspLabel">Version Found In:</td><td> |
| 615 | 615 | @ <input type="text" name="foundin" size="50" value="$<foundin>" /> |
| 616 | 616 | @ </td></tr> |
| 617 | -@ | |
| 617 | +@ | |
| 618 | 618 | @ <tr><td colspan="2"> |
| 619 | 619 | @ Append Remark with format |
| 620 | 620 | @ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1> |
| 621 | 621 | @ from |
| 622 | 622 | @ <input type="text" name="username" value="$<username>" size="30" />:<br /> |
| 623 | 623 | @ <textarea name="icomment" cols="80" rows="15" |
| 624 | 624 | @ wrap="virtual" class="wikiedit">$<icomment></textarea> |
| 625 | 625 | @ </td></tr> |
| 626 | -@ | |
| 626 | +@ | |
| 627 | 627 | @ <th1>enable_output [info exists preview]</th1> |
| 628 | 628 | @ <tr><td colspan="2"> |
| 629 | 629 | @ Description Preview:<br><hr> |
| 630 | 630 | @ <th1> |
| 631 | 631 | @ if {$mutype eq "Wiki"} { |
| @@ -641,34 +641,34 @@ | ||
| 641 | 641 | @ } |
| 642 | 642 | @ </th1> |
| 643 | 643 | @ <hr> |
| 644 | 644 | @ </td></tr> |
| 645 | 645 | @ <th1>enable_output 1</th1> |
| 646 | -@ | |
| 646 | +@ | |
| 647 | 647 | @ <tr> |
| 648 | 648 | @ <td align="right"> |
| 649 | 649 | @ <input type="submit" name="preview" value="Preview" /> |
| 650 | 650 | @ </td> |
| 651 | 651 | @ <td align="left">See how the description will appear after formatting.</td> |
| 652 | 652 | @ </tr> |
| 653 | -@ | |
| 653 | +@ | |
| 654 | 654 | @ <th1>enable_output [info exists preview]</th1> |
| 655 | 655 | @ <tr> |
| 656 | 656 | @ <td align="right"> |
| 657 | 657 | @ <input type="submit" name="submit" value="Submit" /> |
| 658 | 658 | @ </td> |
| 659 | 659 | @ <td align="left">Apply the changes shown above</td> |
| 660 | 660 | @ </tr> |
| 661 | 661 | @ <th1>enable_output 1</th1> |
| 662 | -@ | |
| 662 | +@ | |
| 663 | 663 | @ <tr> |
| 664 | 664 | @ <td align="right"> |
| 665 | 665 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 666 | 666 | @ </td> |
| 667 | 667 | @ <td>Abandon this edit</td> |
| 668 | 668 | @ </tr> |
| 669 | -@ | |
| 669 | +@ | |
| 670 | 670 | @ </table> |
| 671 | 671 | ; |
| 672 | 672 | |
| 673 | 673 | /* |
| 674 | 674 | ** Return the code used to generate the edit ticket page |
| @@ -703,16 +703,16 @@ | ||
| 703 | 703 | @ if {[hascap n]} { |
| 704 | 704 | @ html "<p>Enter a new ticket:</p>" |
| 705 | 705 | @ html "<ul><li><a href='tktnew'>New ticket</a></li></ul>" |
| 706 | 706 | @ } |
| 707 | 707 | @ </th1> |
| 708 | -@ | |
| 708 | +@ | |
| 709 | 709 | @ <p>Choose a report format from the following list:</p> |
| 710 | 710 | @ <ol> |
| 711 | 711 | @ <th1>html $report_items</th1> |
| 712 | 712 | @ </ol> |
| 713 | -@ | |
| 713 | +@ | |
| 714 | 714 | @ <th1> |
| 715 | 715 | @ if {[hascap t q]} { |
| 716 | 716 | @ html "<p>Other options:</p>\n<ul>\n" |
| 717 | 717 | @ if {[hascap t]} { |
| 718 | 718 | @ html "<li><a href='rptnew'>New report format</a></li>\n" |
| @@ -750,11 +750,11 @@ | ||
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | /* |
| 753 | 753 | ** The default template ticket report format: |
| 754 | 754 | */ |
| 755 | -static char zDefaultReport[] = | |
| 755 | +static char zDefaultReport[] = | |
| 756 | 756 | @ SELECT |
| 757 | 757 | @ CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc' |
| 758 | 758 | @ WHEN status='Review' THEN '#e8e8e8' |
| 759 | 759 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 760 | 760 | @ WHEN status='Tested' THEN '#bde5d6' |
| @@ -799,11 +799,11 @@ | ||
| 799 | 799 | } |
| 800 | 800 | |
| 801 | 801 | /* |
| 802 | 802 | ** The default template ticket key: |
| 803 | 803 | */ |
| 804 | -static const char zDefaultKey[] = | |
| 804 | +static const char zDefaultKey[] = | |
| 805 | 805 | @ #ffffff Key: |
| 806 | 806 | @ #f2dcdc Active |
| 807 | 807 | @ #e8e8e8 Review |
| 808 | 808 | @ #cfe8bd Fixed |
| 809 | 809 | @ #bde5d6 Tested |
| @@ -880,7 +880,7 @@ | ||
| 880 | 880 | @ <input type="submit" name="setup" value="Cancel" /> |
| 881 | 881 | @ </p> |
| 882 | 882 | @ </div></form> |
| 883 | 883 | db_end_transaction(0); |
| 884 | 884 | style_footer(); |
| 885 | - | |
| 885 | + | |
| 886 | 886 | } |
| 887 | 887 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -115,11 +115,11 @@ | |
| 115 | void (*xRebuild)(void), /* Run after successful update */ |
| 116 | int height /* Height of the edit box */ |
| 117 | ){ |
| 118 | const char *z; |
| 119 | int isSubmit; |
| 120 | |
| 121 | login_check_credentials(); |
| 122 | if( !g.perm.Setup ){ |
| 123 | login_needed(); |
| 124 | } |
| 125 | if( P("setup") ){ |
| @@ -314,43 +314,43 @@ | |
| 314 | @ <td colspan="3"> |
| 315 | @ Enter a one-line summary of the ticket:<br /> |
| 316 | @ <input type="text" name="title" size="60" value="$<title>" /> |
| 317 | @ </td> |
| 318 | @ </tr> |
| 319 | @ |
| 320 | @ <tr> |
| 321 | @ <td align="right">Type:</td> |
| 322 | @ <td align="left"><th1>combobox type $type_choices 1</th1></td> |
| 323 | @ <td align="left">What type of ticket is this?</td> |
| 324 | @ </tr> |
| 325 | @ |
| 326 | @ <tr> |
| 327 | @ <td align="right">Version:</td> |
| 328 | @ <td align="left"> |
| 329 | @ <input type="text" name="foundin" size="20" value="$<foundin>" /> |
| 330 | @ </td> |
| 331 | @ <td align="left">In what version or build number do you observe |
| 332 | @ the problem?</td> |
| 333 | @ </tr> |
| 334 | @ |
| 335 | @ <tr> |
| 336 | @ <td align="right">Severity:</td> |
| 337 | @ <td align="left"><th1>combobox severity $severity_choices 1</th1></td> |
| 338 | @ <td align="left">How debilitating is the problem? How badly does the problem |
| 339 | @ affect the operation of the product?</td> |
| 340 | @ </tr> |
| 341 | @ |
| 342 | @ <tr> |
| 343 | @ <td align="right">EMail:</td> |
| 344 | @ <td align="left"> |
| 345 | @ <input type="text" name="private_contact" value="$<private_contact>" |
| 346 | @ size="30" /> |
| 347 | @ </td> |
| 348 | @ <td align="left"><u>Not publicly visible</u> |
| 349 | @ Used by developers to contact you with questions.</td> |
| 350 | @ </tr> |
| 351 | @ |
| 352 | @ <tr> |
| 353 | @ <td colspan="3"> |
| 354 | @ Enter a detailed description of the problem. |
| 355 | @ For code defects, be sure to provide details on exactly how |
| 356 | @ the problem can be reproduced. Provide as much detail as |
| @@ -359,11 +359,11 @@ | |
| 359 | @ <br /> |
| 360 | @ <th1>set nline [linecount $comment 50 10]</th1> |
| 361 | @ <textarea name="icomment" cols="80" rows="$nline" |
| 362 | @ wrap="virtual" class="wikiedit">$<icomment></textarea><br /> |
| 363 | @ </tr> |
| 364 | @ |
| 365 | @ <th1>enable_output [info exists preview]</th1> |
| 366 | @ <tr><td colspan="3"> |
| 367 | @ Description Preview:<br /><hr /> |
| 368 | @ <th1> |
| 369 | @ if {$mutype eq "Wiki"} { |
| @@ -378,28 +378,28 @@ | |
| 378 | @ wiki "<nowiki>$icomment\n</nowiki>" |
| 379 | @ } |
| 380 | @ </th1> |
| 381 | @ <hr /></td></tr> |
| 382 | @ <th1>enable_output 1</th1> |
| 383 | @ |
| 384 | @ <tr> |
| 385 | @ <td><td align="left"> |
| 386 | @ <input type="submit" name="preview" value="Preview" /> |
| 387 | @ </td> |
| 388 | @ <td align="left">See how the description will appear after formatting.</td> |
| 389 | @ </tr> |
| 390 | @ |
| 391 | @ <th1>enable_output [info exists preview]</th1> |
| 392 | @ <tr> |
| 393 | @ <td><td align="left"> |
| 394 | @ <input type="submit" name="submit" value="Submit" /> |
| 395 | @ </td> |
| 396 | @ <td align="left">After filling in the information above, press this |
| 397 | @ button to create the new ticket</td> |
| 398 | @ </tr> |
| 399 | @ <th1>enable_output 1</th1> |
| 400 | @ |
| 401 | @ <tr> |
| 402 | @ <td><td align="left"> |
| 403 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 404 | @ </td> |
| 405 | @ <td>Abandon and forget this ticket</td> |
| @@ -477,11 +477,11 @@ | |
| 477 | @ </tr> |
| 478 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 479 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 480 | @ $<foundin> |
| 481 | @ </td></tr> |
| 482 | @ |
| 483 | @ <th1> |
| 484 | @ if {[info exists comment] && [string length $comment]>10} { |
| 485 | @ html { |
| 486 | @ <tr><td class="tktDspLabel">Description:</td></tr> |
| 487 | @ <tr><td colspan="5" class="tktDspValue"> |
| @@ -577,55 +577,55 @@ | |
| 577 | @ </th1> |
| 578 | @ <table cellpadding="5"> |
| 579 | @ <tr><td class="tktDspLabel">Title:</td><td> |
| 580 | @ <input type="text" name="title" value="$<title>" size="60" /> |
| 581 | @ </td></tr> |
| 582 | @ |
| 583 | @ <tr><td class="tktDspLabel">Status:</td><td> |
| 584 | @ <th1>combobox status $status_choices 1</th1> |
| 585 | @ </td></tr> |
| 586 | @ |
| 587 | @ <tr><td class="tktDspLabel">Type:</td><td> |
| 588 | @ <th1>combobox type $type_choices 1</th1> |
| 589 | @ </td></tr> |
| 590 | @ |
| 591 | @ <tr><td class="tktDspLabel">Severity:</td><td> |
| 592 | @ <th1>combobox severity $severity_choices 1</th1> |
| 593 | @ </td></tr> |
| 594 | @ |
| 595 | @ <tr><td class="tktDspLabel">Priority:</td><td> |
| 596 | @ <th1>combobox priority $priority_choices 1</th1> |
| 597 | @ </td></tr> |
| 598 | @ |
| 599 | @ <tr><td class="tktDspLabel">Resolution:</td><td> |
| 600 | @ <th1>combobox resolution $resolution_choices 1</th1> |
| 601 | @ </td></tr> |
| 602 | @ |
| 603 | @ <tr><td class="tktDspLabel">Subsystem:</td><td> |
| 604 | @ <th1>combobox subsystem $subsystem_choices 1</th1> |
| 605 | @ </td></tr> |
| 606 | @ |
| 607 | @ <th1>enable_output [hascap e]</th1> |
| 608 | @ <tr><td class="tktDspLabel">Contact:</td><td> |
| 609 | @ <input type="text" name="private_contact" size="40" |
| 610 | @ value="$<private_contact>" /> |
| 611 | @ </td></tr> |
| 612 | @ <th1>enable_output 1</th1> |
| 613 | @ |
| 614 | @ <tr><td class="tktDspLabel">Version Found In:</td><td> |
| 615 | @ <input type="text" name="foundin" size="50" value="$<foundin>" /> |
| 616 | @ </td></tr> |
| 617 | @ |
| 618 | @ <tr><td colspan="2"> |
| 619 | @ Append Remark with format |
| 620 | @ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1> |
| 621 | @ from |
| 622 | @ <input type="text" name="username" value="$<username>" size="30" />:<br /> |
| 623 | @ <textarea name="icomment" cols="80" rows="15" |
| 624 | @ wrap="virtual" class="wikiedit">$<icomment></textarea> |
| 625 | @ </td></tr> |
| 626 | @ |
| 627 | @ <th1>enable_output [info exists preview]</th1> |
| 628 | @ <tr><td colspan="2"> |
| 629 | @ Description Preview:<br><hr> |
| 630 | @ <th1> |
| 631 | @ if {$mutype eq "Wiki"} { |
| @@ -641,34 +641,34 @@ | |
| 641 | @ } |
| 642 | @ </th1> |
| 643 | @ <hr> |
| 644 | @ </td></tr> |
| 645 | @ <th1>enable_output 1</th1> |
| 646 | @ |
| 647 | @ <tr> |
| 648 | @ <td align="right"> |
| 649 | @ <input type="submit" name="preview" value="Preview" /> |
| 650 | @ </td> |
| 651 | @ <td align="left">See how the description will appear after formatting.</td> |
| 652 | @ </tr> |
| 653 | @ |
| 654 | @ <th1>enable_output [info exists preview]</th1> |
| 655 | @ <tr> |
| 656 | @ <td align="right"> |
| 657 | @ <input type="submit" name="submit" value="Submit" /> |
| 658 | @ </td> |
| 659 | @ <td align="left">Apply the changes shown above</td> |
| 660 | @ </tr> |
| 661 | @ <th1>enable_output 1</th1> |
| 662 | @ |
| 663 | @ <tr> |
| 664 | @ <td align="right"> |
| 665 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 666 | @ </td> |
| 667 | @ <td>Abandon this edit</td> |
| 668 | @ </tr> |
| 669 | @ |
| 670 | @ </table> |
| 671 | ; |
| 672 | |
| 673 | /* |
| 674 | ** Return the code used to generate the edit ticket page |
| @@ -703,16 +703,16 @@ | |
| 703 | @ if {[hascap n]} { |
| 704 | @ html "<p>Enter a new ticket:</p>" |
| 705 | @ html "<ul><li><a href='tktnew'>New ticket</a></li></ul>" |
| 706 | @ } |
| 707 | @ </th1> |
| 708 | @ |
| 709 | @ <p>Choose a report format from the following list:</p> |
| 710 | @ <ol> |
| 711 | @ <th1>html $report_items</th1> |
| 712 | @ </ol> |
| 713 | @ |
| 714 | @ <th1> |
| 715 | @ if {[hascap t q]} { |
| 716 | @ html "<p>Other options:</p>\n<ul>\n" |
| 717 | @ if {[hascap t]} { |
| 718 | @ html "<li><a href='rptnew'>New report format</a></li>\n" |
| @@ -750,11 +750,11 @@ | |
| 750 | } |
| 751 | |
| 752 | /* |
| 753 | ** The default template ticket report format: |
| 754 | */ |
| 755 | static char zDefaultReport[] = |
| 756 | @ SELECT |
| 757 | @ CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc' |
| 758 | @ WHEN status='Review' THEN '#e8e8e8' |
| 759 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 760 | @ WHEN status='Tested' THEN '#bde5d6' |
| @@ -799,11 +799,11 @@ | |
| 799 | } |
| 800 | |
| 801 | /* |
| 802 | ** The default template ticket key: |
| 803 | */ |
| 804 | static const char zDefaultKey[] = |
| 805 | @ #ffffff Key: |
| 806 | @ #f2dcdc Active |
| 807 | @ #e8e8e8 Review |
| 808 | @ #cfe8bd Fixed |
| 809 | @ #bde5d6 Tested |
| @@ -880,7 +880,7 @@ | |
| 880 | @ <input type="submit" name="setup" value="Cancel" /> |
| 881 | @ </p> |
| 882 | @ </div></form> |
| 883 | db_end_transaction(0); |
| 884 | style_footer(); |
| 885 | |
| 886 | } |
| 887 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -115,11 +115,11 @@ | |
| 115 | void (*xRebuild)(void), /* Run after successful update */ |
| 116 | int height /* Height of the edit box */ |
| 117 | ){ |
| 118 | const char *z; |
| 119 | int isSubmit; |
| 120 | |
| 121 | login_check_credentials(); |
| 122 | if( !g.perm.Setup ){ |
| 123 | login_needed(); |
| 124 | } |
| 125 | if( P("setup") ){ |
| @@ -314,43 +314,43 @@ | |
| 314 | @ <td colspan="3"> |
| 315 | @ Enter a one-line summary of the ticket:<br /> |
| 316 | @ <input type="text" name="title" size="60" value="$<title>" /> |
| 317 | @ </td> |
| 318 | @ </tr> |
| 319 | @ |
| 320 | @ <tr> |
| 321 | @ <td align="right">Type:</td> |
| 322 | @ <td align="left"><th1>combobox type $type_choices 1</th1></td> |
| 323 | @ <td align="left">What type of ticket is this?</td> |
| 324 | @ </tr> |
| 325 | @ |
| 326 | @ <tr> |
| 327 | @ <td align="right">Version:</td> |
| 328 | @ <td align="left"> |
| 329 | @ <input type="text" name="foundin" size="20" value="$<foundin>" /> |
| 330 | @ </td> |
| 331 | @ <td align="left">In what version or build number do you observe |
| 332 | @ the problem?</td> |
| 333 | @ </tr> |
| 334 | @ |
| 335 | @ <tr> |
| 336 | @ <td align="right">Severity:</td> |
| 337 | @ <td align="left"><th1>combobox severity $severity_choices 1</th1></td> |
| 338 | @ <td align="left">How debilitating is the problem? How badly does the problem |
| 339 | @ affect the operation of the product?</td> |
| 340 | @ </tr> |
| 341 | @ |
| 342 | @ <tr> |
| 343 | @ <td align="right">EMail:</td> |
| 344 | @ <td align="left"> |
| 345 | @ <input type="text" name="private_contact" value="$<private_contact>" |
| 346 | @ size="30" /> |
| 347 | @ </td> |
| 348 | @ <td align="left"><u>Not publicly visible</u> |
| 349 | @ Used by developers to contact you with questions.</td> |
| 350 | @ </tr> |
| 351 | @ |
| 352 | @ <tr> |
| 353 | @ <td colspan="3"> |
| 354 | @ Enter a detailed description of the problem. |
| 355 | @ For code defects, be sure to provide details on exactly how |
| 356 | @ the problem can be reproduced. Provide as much detail as |
| @@ -359,11 +359,11 @@ | |
| 359 | @ <br /> |
| 360 | @ <th1>set nline [linecount $comment 50 10]</th1> |
| 361 | @ <textarea name="icomment" cols="80" rows="$nline" |
| 362 | @ wrap="virtual" class="wikiedit">$<icomment></textarea><br /> |
| 363 | @ </tr> |
| 364 | @ |
| 365 | @ <th1>enable_output [info exists preview]</th1> |
| 366 | @ <tr><td colspan="3"> |
| 367 | @ Description Preview:<br /><hr /> |
| 368 | @ <th1> |
| 369 | @ if {$mutype eq "Wiki"} { |
| @@ -378,28 +378,28 @@ | |
| 378 | @ wiki "<nowiki>$icomment\n</nowiki>" |
| 379 | @ } |
| 380 | @ </th1> |
| 381 | @ <hr /></td></tr> |
| 382 | @ <th1>enable_output 1</th1> |
| 383 | @ |
| 384 | @ <tr> |
| 385 | @ <td><td align="left"> |
| 386 | @ <input type="submit" name="preview" value="Preview" /> |
| 387 | @ </td> |
| 388 | @ <td align="left">See how the description will appear after formatting.</td> |
| 389 | @ </tr> |
| 390 | @ |
| 391 | @ <th1>enable_output [info exists preview]</th1> |
| 392 | @ <tr> |
| 393 | @ <td><td align="left"> |
| 394 | @ <input type="submit" name="submit" value="Submit" /> |
| 395 | @ </td> |
| 396 | @ <td align="left">After filling in the information above, press this |
| 397 | @ button to create the new ticket</td> |
| 398 | @ </tr> |
| 399 | @ <th1>enable_output 1</th1> |
| 400 | @ |
| 401 | @ <tr> |
| 402 | @ <td><td align="left"> |
| 403 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 404 | @ </td> |
| 405 | @ <td>Abandon and forget this ticket</td> |
| @@ -477,11 +477,11 @@ | |
| 477 | @ </tr> |
| 478 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 479 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 480 | @ $<foundin> |
| 481 | @ </td></tr> |
| 482 | @ |
| 483 | @ <th1> |
| 484 | @ if {[info exists comment] && [string length $comment]>10} { |
| 485 | @ html { |
| 486 | @ <tr><td class="tktDspLabel">Description:</td></tr> |
| 487 | @ <tr><td colspan="5" class="tktDspValue"> |
| @@ -577,55 +577,55 @@ | |
| 577 | @ </th1> |
| 578 | @ <table cellpadding="5"> |
| 579 | @ <tr><td class="tktDspLabel">Title:</td><td> |
| 580 | @ <input type="text" name="title" value="$<title>" size="60" /> |
| 581 | @ </td></tr> |
| 582 | @ |
| 583 | @ <tr><td class="tktDspLabel">Status:</td><td> |
| 584 | @ <th1>combobox status $status_choices 1</th1> |
| 585 | @ </td></tr> |
| 586 | @ |
| 587 | @ <tr><td class="tktDspLabel">Type:</td><td> |
| 588 | @ <th1>combobox type $type_choices 1</th1> |
| 589 | @ </td></tr> |
| 590 | @ |
| 591 | @ <tr><td class="tktDspLabel">Severity:</td><td> |
| 592 | @ <th1>combobox severity $severity_choices 1</th1> |
| 593 | @ </td></tr> |
| 594 | @ |
| 595 | @ <tr><td class="tktDspLabel">Priority:</td><td> |
| 596 | @ <th1>combobox priority $priority_choices 1</th1> |
| 597 | @ </td></tr> |
| 598 | @ |
| 599 | @ <tr><td class="tktDspLabel">Resolution:</td><td> |
| 600 | @ <th1>combobox resolution $resolution_choices 1</th1> |
| 601 | @ </td></tr> |
| 602 | @ |
| 603 | @ <tr><td class="tktDspLabel">Subsystem:</td><td> |
| 604 | @ <th1>combobox subsystem $subsystem_choices 1</th1> |
| 605 | @ </td></tr> |
| 606 | @ |
| 607 | @ <th1>enable_output [hascap e]</th1> |
| 608 | @ <tr><td class="tktDspLabel">Contact:</td><td> |
| 609 | @ <input type="text" name="private_contact" size="40" |
| 610 | @ value="$<private_contact>" /> |
| 611 | @ </td></tr> |
| 612 | @ <th1>enable_output 1</th1> |
| 613 | @ |
| 614 | @ <tr><td class="tktDspLabel">Version Found In:</td><td> |
| 615 | @ <input type="text" name="foundin" size="50" value="$<foundin>" /> |
| 616 | @ </td></tr> |
| 617 | @ |
| 618 | @ <tr><td colspan="2"> |
| 619 | @ Append Remark with format |
| 620 | @ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1> |
| 621 | @ from |
| 622 | @ <input type="text" name="username" value="$<username>" size="30" />:<br /> |
| 623 | @ <textarea name="icomment" cols="80" rows="15" |
| 624 | @ wrap="virtual" class="wikiedit">$<icomment></textarea> |
| 625 | @ </td></tr> |
| 626 | @ |
| 627 | @ <th1>enable_output [info exists preview]</th1> |
| 628 | @ <tr><td colspan="2"> |
| 629 | @ Description Preview:<br><hr> |
| 630 | @ <th1> |
| 631 | @ if {$mutype eq "Wiki"} { |
| @@ -641,34 +641,34 @@ | |
| 641 | @ } |
| 642 | @ </th1> |
| 643 | @ <hr> |
| 644 | @ </td></tr> |
| 645 | @ <th1>enable_output 1</th1> |
| 646 | @ |
| 647 | @ <tr> |
| 648 | @ <td align="right"> |
| 649 | @ <input type="submit" name="preview" value="Preview" /> |
| 650 | @ </td> |
| 651 | @ <td align="left">See how the description will appear after formatting.</td> |
| 652 | @ </tr> |
| 653 | @ |
| 654 | @ <th1>enable_output [info exists preview]</th1> |
| 655 | @ <tr> |
| 656 | @ <td align="right"> |
| 657 | @ <input type="submit" name="submit" value="Submit" /> |
| 658 | @ </td> |
| 659 | @ <td align="left">Apply the changes shown above</td> |
| 660 | @ </tr> |
| 661 | @ <th1>enable_output 1</th1> |
| 662 | @ |
| 663 | @ <tr> |
| 664 | @ <td align="right"> |
| 665 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 666 | @ </td> |
| 667 | @ <td>Abandon this edit</td> |
| 668 | @ </tr> |
| 669 | @ |
| 670 | @ </table> |
| 671 | ; |
| 672 | |
| 673 | /* |
| 674 | ** Return the code used to generate the edit ticket page |
| @@ -703,16 +703,16 @@ | |
| 703 | @ if {[hascap n]} { |
| 704 | @ html "<p>Enter a new ticket:</p>" |
| 705 | @ html "<ul><li><a href='tktnew'>New ticket</a></li></ul>" |
| 706 | @ } |
| 707 | @ </th1> |
| 708 | @ |
| 709 | @ <p>Choose a report format from the following list:</p> |
| 710 | @ <ol> |
| 711 | @ <th1>html $report_items</th1> |
| 712 | @ </ol> |
| 713 | @ |
| 714 | @ <th1> |
| 715 | @ if {[hascap t q]} { |
| 716 | @ html "<p>Other options:</p>\n<ul>\n" |
| 717 | @ if {[hascap t]} { |
| 718 | @ html "<li><a href='rptnew'>New report format</a></li>\n" |
| @@ -750,11 +750,11 @@ | |
| 750 | } |
| 751 | |
| 752 | /* |
| 753 | ** The default template ticket report format: |
| 754 | */ |
| 755 | static char zDefaultReport[] = |
| 756 | @ SELECT |
| 757 | @ CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc' |
| 758 | @ WHEN status='Review' THEN '#e8e8e8' |
| 759 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 760 | @ WHEN status='Tested' THEN '#bde5d6' |
| @@ -799,11 +799,11 @@ | |
| 799 | } |
| 800 | |
| 801 | /* |
| 802 | ** The default template ticket key: |
| 803 | */ |
| 804 | static const char zDefaultKey[] = |
| 805 | @ #ffffff Key: |
| 806 | @ #f2dcdc Active |
| 807 | @ #e8e8e8 Review |
| 808 | @ #cfe8bd Fixed |
| 809 | @ #bde5d6 Tested |
| @@ -880,7 +880,7 @@ | |
| 880 | @ <input type="submit" name="setup" value="Cancel" /> |
| 881 | @ </p> |
| 882 | @ </div></form> |
| 883 | db_end_transaction(0); |
| 884 | style_footer(); |
| 885 | |
| 886 | } |
| 887 |